From 6f0af3c2e3bef9e4d683e27f783024c799452a63 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 20 Dec 2011 14:40:51 +0000 Subject: catch rather unlikely vcl case and don't crash --- vcl/unx/generic/gdi/salgdi.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vcl') 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(); -- cgit