[Libreoffice-commits] core.git: vcl/osx

Tor Lillqvist tml at collabora.com
Thu May 24 17:08:22 UTC 2018


 vcl/osx/vclnsapp.mm |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 158da8687f043dd5e38dce4e9c3a79c314d507e1
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu May 24 14:23:06 2018 +0300

    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 at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

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;


More information about the Libreoffice-commits mailing list