summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-01 19:08:13 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-02 08:38:43 +0200
commit7e9c3569f9258877b5303f041283d4882d1290fe (patch)
tree862932e0115a9e9a904603316ea1570e253863e2 /slideshow
parenta3a203b7c697a38d4f79877d6b5c1423fa52f2d8 (diff)
tdf#92917: fix crash in Impress in viewmediashape (slideshow)
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=172527 I thought about this patch comparing with OGLTransitionerImpl::initWindowFromSlideShowView in: slideshow/source/engine/opengl/TransitionerImpl.cxx 304 /// take the XSlideShowView and extract the parent window from it. see viewmediashape.cxx 305 uno::Reference< rendering::XCanvas > xCanvas(mxView->getCanvas(), uno::UNO_QUERY_THROW); 306 uno::Sequence< uno::Any > aDeviceParams; 307 ::canvas::tools::getDeviceInfo( xCanvas, aDeviceParams ); ... 317 OutputDevice* pDevice = reinterpret_cast<OutputDevice*>(aVal); 318 vcl::Window* pWindow = pDevice ? pDevice->GetOwnerWindow() : nullptr; Change-Id: I183cc8271f75fb145c27688c5594805792c1fdaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116551 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index cddaea4c1b0b..2179f71ba78c 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -393,7 +393,8 @@ namespace slideshow::internal
rVCLDeviceParams[ 1 ] >>= aVal;
- vcl::Window* pWindow = reinterpret_cast< vcl::Window* >( aVal );
+ OutputDevice* pDevice = reinterpret_cast<OutputDevice*>(aVal);
+ vcl::Window* pWindow = pDevice ? pDevice->GetOwnerWindow() : nullptr;
if( pWindow )
{