[Libreoffice-commits] core.git: vcl/unx

Jan Holesovsky kendy at collabora.com
Thu Jun 11 12:28:05 PDT 2015


 vcl/unx/generic/gdi/salvd.cxx |    3 +++
 vcl/unx/gtk/app/gtkinst.cxx   |    9 ++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 6bf39b2f4ea4e880d8414b04269405e6b48efe23
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Jun 11 21:23:15 2015 +0200

    Fix LibreOffice running with SAL_ENABLEGL=1
    
    Change-Id: I302ab9e38831403cbb4aa96c61d4862f43537e8e

diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index 847ea9d..0a54146 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 11a18e5..357d24c 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
 }
 


More information about the Libreoffice-commits mailing list