[Libreoffice-commits] core.git: sdext/source sd/source
Caolán McNamara
caolanm at redhat.com
Wed Nov 20 01:23:06 PST 2013
sd/source/ui/presenter/SlideRenderer.cxx | 10 ++++++++--
sdext/source/presenter/PresenterPaneContainer.cxx | 3 ++-
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit bae01385c895a100b5371879889e606927cff877
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 20 09:03:19 2013 +0000
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
diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx
index 9cdfcf8..98db0b1 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;
}
diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx
index 105c124..c8de7bf 100644
--- a/sdext/source/presenter/PresenterPaneContainer.cxx
+++ b/sdext/source/presenter/PresenterPaneContainer.cxx
@@ -192,7 +192,8 @@ PresenterPaneContainer::SharedPaneDescriptor
{
pDescriptor->mxView = rxView;
pDescriptor->mpViewBackground = rpViewBackground;
- pDescriptor->mxPane->SetBackground(rpViewBackground);
+ if (pDescriptor->mxPane.is())
+ pDescriptor->mxPane->SetBackground(rpViewBackground);
try
{
if ( ! pDescriptor->maViewInitialization.empty())
More information about the Libreoffice-commits
mailing list