summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-11 21:23:15 +0200
committerJan Holesovsky <kendy@collabora.com>2015-06-11 21:27:25 +0200
commit6bf39b2f4ea4e880d8414b04269405e6b48efe23 (patch)
tree10cda384c4a7aa68c3ec8d10f14075118886e3d9 /vcl
parent6d7dcb81a25bb8896adad352a9e7151a41e18245 (diff)
Fix LibreOffice running with SAL_ENABLEGL=1
Change-Id: I302ab9e38831403cbb4aa96c61d4862f43537e8e
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx3
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx9
2 files changed, 9 insertions, 3 deletions
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index 847ea9d09509..0a5414638338 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -42,7 +42,10 @@ SalVirtualDevice* X11SalInstance::CreateX11VirtualDevice(SalGraphics* pGraphics,
if (OpenGLHelper::isVCLOpenGLEnabled())
return new X11OpenGLSalVirtualDevice( pGraphics, nDX, nDY, nBitCount, pData );
else
+ {
+ assert(pNewGraphics);
return new X11SalVirtualDevice(pGraphics, nDX, nDY, nBitCount, pData, pNewGraphics);
+ }
}
SalVirtualDevice* X11SalInstance::CreateVirtualDevice(SalGraphics* pGraphics,
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 11a18e5e90e0..357d24c789ce 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -322,9 +322,12 @@ SalVirtualDevice* GtkInstance::CreateVirtualDevice( SalGraphics *pG,
return pNew;
#else
GtkSalGraphics *pGtkSalGraphics = dynamic_cast<GtkSalGraphics*>(pG);
- assert(pGtkSalGraphics);
- return CreateX11VirtualDevice(pG, nDX, nDY, nBitCount, pGd,
- new GtkSalGraphics(pGtkSalGraphics->GetGtkFrame(), pGtkSalGraphics->GetGtkWidget()));
+
+ GtkSalGraphics *pNewGraphics = NULL;
+ if (pGtkSalGraphics)
+ pNewGraphics = new GtkSalGraphics(pGtkSalGraphics->GetGtkFrame(), pGtkSalGraphics->GetGtkWidget());
+
+ return CreateX11VirtualDevice(pG, nDX, nDY, nBitCount, pGd, pNewGraphics);
#endif
}