diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-16 14:35:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-16 14:37:01 +0100 |
commit | 687275db4c13daf5d31123ac65517e07172278ee (patch) | |
tree | 14d3c848888bd564f81a8ad180991c3fa6de6b5a /sd/source | |
parent | ea8028a575f666ae32e2564a0d3557287909030f (diff) |
canvas is null under Xdmx so createBitmap fails
Change-Id: Ia7ce38ef07e6225ce785fab580343dfcd7ecb948
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/presenter/PresenterHelper.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index d1180ccfe8bc..eb5b18520a75 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; |