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

Tor Lillqvist tml at collabora.com
Sun Mar 29 23:50:35 PDT 2015


 vcl/quartz/salgdicommon.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 17309d29794951cd07376a1bfcc547b418a28241
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Mar 30 01:38:34 2015 +0300

    Don't crash if no screens available (no access to the window system)
    
    Fixes a crash when running gengal on OS X in a ssh session when not
    logged in through the window system at the same time.
    
    Change-Id: I6a47666aeac43fc140f52ae2d62b36eadc976246

diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 8cbbf65..ac65c77 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -1693,7 +1693,7 @@ void AquaSalGraphics::initResolution( NSWindow* )
         if( pScreen == nil )
         {
             NSArray* pScreens = [NSScreen screens];
-            if( pScreens )
+            if( pScreens && [pScreens count] > 0)
                 pScreen = [pScreens objectAtIndex: 0];
         }
 


More information about the Libreoffice-commits mailing list