diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-12-20 14:40:51 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-12-20 14:41:27 +0000 |
commit | 6f0af3c2e3bef9e4d683e27f783024c799452a63 (patch) | |
tree | ea0834a43f9a91347351e3cbbfbb208a2cc988f9 /vcl | |
parent | cdd2792816af95d9c8a0fea07d989102c2f633b0 (diff) |
catch rather unlikely vcl case and don't crash
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index e3e109012aa7..abd153a86ef0 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -494,6 +494,12 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const { const SalDisplay *pDisplay = GetDisplay(); + if (!pDisplay) + { + OSL_TRACE("Null display"); + rDPIX = rDPIY = 96; + return; + } rDPIX = pDisplay->GetResolution().A(); rDPIY = pDisplay->GetResolution().B(); |