diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-05-24 14:23:06 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-24 19:07:59 +0200 |
commit | 158da8687f043dd5e38dce4e9c3a79c314d507e1 (patch) | |
tree | c4cb05ad1ce9e059f56b1115c19da3d10c7b7c0f /vcl/osx | |
parent | b6777968a4457bb8aadb51a7f6a7bf1be4477552 (diff) |
tdf#77444: Follow-up fix: Guard against GetSalData()->mpInstance being null
Can happen at least when LibreOffice is started from the command line
using the 'open' command line and passed a file name.
Change-Id: I93145974a56e124550579cae8fd69ccb4a7d3bda
Reviewed-on: https://gerrit.libreoffice.org/54758
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/vclnsapp.mm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index 4edf177d9b6b..edf7549a0993 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -249,7 +249,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFile); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; - pInst->TriggerUserEventProcessing(); + if( pInst ) + pInst->TriggerUserEventProcessing(); } return YES; } @@ -279,7 +280,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFileList); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; - pInst->TriggerUserEventProcessing(); + if( pInst ) + pInst->TriggerUserEventProcessing(); } } @@ -291,7 +293,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFile); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; - pInst->TriggerUserEventProcessing(); + if( pInst ) + pInst->TriggerUserEventProcessing(); return YES; } -(NSApplicationPrintReply)application: (NSApplication *) app printFiles:(NSArray *)files withSettings: (NSDictionary *)printSettings showPrintPanels:(BOOL)bShowPrintPanels @@ -312,7 +315,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFileList); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; - pInst->TriggerUserEventProcessing(); + if( pInst ) + pInst->TriggerUserEventProcessing(); // we have no back channel here, we have to assume success // correct handling would be NSPrintingReplyLater and then send [app replyToOpenOrPrint] return NSPrintingSuccess; |