diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-20 09:03:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-20 09:21:44 +0000 |
commit | bae01385c895a100b5371879889e606927cff877 (patch) | |
tree | 91c06aa39e751ef34a5c631169264cefe8d1e552 /sd/source | |
parent | 142e89e6c2f5ae292cf70bffaf2d9dbc8c9a2ecd (diff) |
Resolves: fdo#71527 don't crash in presenter console
but we're now dropping slides in there for some reason so
this is just a don't crash band-aid and not the fix
for the deeper problem
Change-Id: I2f70471d03979ffb86b6289e7a432f4505c1b556
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/presenter/SlideRenderer.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index 9cdfcf8cc19d..98db0b119a02 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -134,9 +134,15 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas ( cppcanvas::BitmapCanvasSharedPtr pCanvas (cppcanvas::VCLFactory::getInstance().createCanvas( Reference<rendering::XBitmapCanvas>(rxCanvas, UNO_QUERY))); if (pCanvas.get() != NULL) - return cppcanvas::VCLFactory::getInstance().createBitmap( + { + cppcanvas::BitmapSharedPtr xBitmap( + cppcanvas::VCLFactory::getInstance().createBitmap( pCanvas, - CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))->getUNOBitmap(); + CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))); + if (xBitmap.get() == NULL) + return NULL; + return xBitmap->getUNOBitmap(); + } else return NULL; } |