[Libreoffice-commits] core.git: sd/source

Caolán McNamara caolanm at redhat.com
Wed Oct 16 06:37:22 PDT 2013


 sd/source/ui/presenter/PresenterHelper.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 687275db4c13daf5d31123ac65517e07172278ee
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 16 14:35:44 2013 +0100

    canvas is null under Xdmx so createBitmap fails
    
    Change-Id: Ia7ce38ef07e6225ce785fab580343dfcd7ecb948

diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index d1180cc..eb5b185 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -454,11 +454,15 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
         cppcanvas::VCLFactory::getInstance().createCanvas(
             Reference<css::rendering::XBitmapCanvas>(rxCanvas,UNO_QUERY)));
 
-    if (pCanvas.get()!=NULL)
+    if (pCanvas.get() != NULL)
     {
         BitmapEx aBitmapEx = SdResId(nid);
-        return cppcanvas::VCLFactory::getInstance().createBitmap(
-            pCanvas, aBitmapEx)->getUNOBitmap();
+        cppcanvas::BitmapSharedPtr xBitmap(
+            cppcanvas::VCLFactory::getInstance().createBitmap(pCanvas,
+                aBitmapEx));
+        if (xBitmap.get() == NULL)
+            return NULL;
+        return xBitmap->getUNOBitmap();
     }
 
     return NULL;


More information about the Libreoffice-commits mailing list