summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-24 12:38:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-24 16:23:08 +0200
commit7f6f57fe93cef0482e1e8b352987f185c56e2d64 (patch)
tree886c48d5a085502f1f5167e3f56e92ba40faf4bd
parent4c5bbb25d215b618c38e2fec58d0cc2f16af3f18 (diff)
crash on launching opengl slide transitions under gtk3
since... commit 9090dc1f3b27195f5defd35586ac79357992be21 Date: Mon Jan 18 18:27:19 2021 +0200 split OutputDevice from Window note SpriteDeviceHelper::getDeviceHandle seems to return a vcl::Window and not an OutputDevice like the other ::getDeviceHandle so that probably needs changing too, or the others need to return the owner window. Change-Id: I84da379e680d3da5775855a16dc716decef22bbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116052 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
-rw-r--r--slideshow/source/engine/opengl/TransitionerImpl.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index f206f2015664..bf8c23744fc3 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -314,9 +314,12 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
mpContext = OpenGLContext::Create();
- if( !mpContext->init( reinterpret_cast< vcl::Window* >( aVal ) ) ) {
+ OutputDevice* pDevice = reinterpret_cast<OutputDevice*>(aVal);
+ vcl::Window* pWindow = pDevice ? pDevice->GetOwnerWindow() : nullptr;
+
+ if( !mpContext->init( pWindow) ) {
mpContext->requestLegacyContext();
- if( !mpContext->init( reinterpret_cast< vcl::Window* >( aVal ) ) )
+ if( !mpContext->init( pWindow ) )
return false;
}
SAL_INFO("slideshow.opengl", "created the context");