[Libreoffice-commits] core.git: slideshow/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 2 06:39:19 UTC 2021
slideshow/source/engine/shapes/viewmediashape.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 7e9c3569f9258877b5303f041283d4882d1290fe
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Jun 1 19:08:13 2021 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Wed Jun 2 08:38:43 2021 +0200
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 at collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
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 )
{
More information about the Libreoffice-commits
mailing list