summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-03-30 01:38:34 +0300
committerTor Lillqvist <tml@collabora.com>2015-03-30 09:49:48 +0300
commit17309d29794951cd07376a1bfcc547b418a28241 (patch)
tree96ef8f214ab01666e9bf9de6dd45d31d8db8438b /vcl
parent64c251f99ba633c96c1e3410e69dfcdcbf44a267 (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')
-rw-r--r--vcl/quartz/salgdicommon.cxx2
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];
}