summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-05-24 14:23:06 +0300
committerTor Lillqvist <tml@collabora.com>2018-05-24 19:07:59 +0200
commit158da8687f043dd5e38dce4e9c3a79c314d507e1 (patch)
treec4cb05ad1ce9e059f56b1115c19da3d10c7b7c0f
parentb6777968a4457bb8aadb51a7f6a7bf1be4477552 (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>
-rw-r--r--vcl/osx/vclnsapp.mm12
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;