From 12b80e76ca8f716984980f8e47bbe9785709b238 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 27 Oct 2010 16:19:57 +0200 Subject: Fix crash in OGL transitions Seems on sufficiently slow displays, the disposeTextures() call comes before any window / context has been setup. Fixed along the lines of fdo#31072. --- .../source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'slideshow/source') diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx index 392dd4694756..2f0c6673ade9 100644 --- a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx @@ -1211,6 +1211,9 @@ void OGLTransitionerImpl::disposeContextAndWindow() void OGLTransitionerImpl::disposeTextures() { + if( !GLWin.ctx ) + return; + #ifdef WNT wglMakeCurrent(GLWin.hDC,GLWin.hRC); #endif @@ -1308,11 +1311,21 @@ OGLTransitionerImpl::OGLTransitionerImpl(OGLTransitionImpl* pOGLTransition) : GLenteringSlide( 0 ), pWindow( NULL ), mxView(), + mxLeavingBitmap(), + mxEnteringBitmap(), EnteringBytes(), LeavingBytes(), +#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap ) + LeavingPixmap(0), + EnteringPixmap(0), +#endif mbRestoreSync( false ), mbUseLeavingPixmap( false ), mbUseEnteringPixmap( false ), + mbFreeLeavingPixmap( false ), + mbFreeEnteringPixmap( false ), + maLeavingPixmap(0), + maEnteringPixmap(0), SlideBitmapLayout(), SlideSize(), pTransition(pOGLTransition) -- cgit