diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-03-30 01:38:34 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-03-30 09:49:48 +0300 |
commit | 17309d29794951cd07376a1bfcc547b418a28241 (patch) | |
tree | 96ef8f214ab01666e9bf9de6dd45d31d8db8438b /vcl/quartz | |
parent | 64c251f99ba633c96c1e3410e69dfcdcbf44a267 (diff) |
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
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 8cbbf657708c..ac65c7727f5d 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]; } |