Kaydet (Commit) 158da868 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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/54758Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst b6777968
......@@ -249,6 +249,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFile);
AquaSalInstance::aAppEventList.push_back( pAppEvent );
AquaSalInstance *pInst = GetSalData()->mpInstance;
if( pInst )
pInst->TriggerUserEventProcessing();
}
return YES;
......@@ -279,6 +280,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFileList);
AquaSalInstance::aAppEventList.push_back( pAppEvent );
AquaSalInstance *pInst = GetSalData()->mpInstance;
if( pInst )
pInst->TriggerUserEventProcessing();
}
}
......@@ -291,6 +293,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFile);
AquaSalInstance::aAppEventList.push_back( pAppEvent );
AquaSalInstance *pInst = GetSalData()->mpInstance;
if( pInst )
pInst->TriggerUserEventProcessing();
return YES;
}
......@@ -312,6 +315,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFileList);
AquaSalInstance::aAppEventList.push_back( pAppEvent );
AquaSalInstance *pInst = GetSalData()->mpInstance;
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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment