summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2010-10-27 16:19:57 +0200
committerThorsten Behrens <tbehrens@novell.com>2010-10-27 17:15:43 +0200
commit12b80e76ca8f716984980f8e47bbe9785709b238 (patch)
tree1a6624fdf541dc36622bb3a37fc75b410bce1056
parentd93277260291eef4ad8303933209eacd438082fb (diff)
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.
-rw-r--r--slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx13
1 files changed, 13 insertions, 0 deletions
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)