summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx6
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();