summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2013-08-13 11:01:54 +0200
committerThorsten Behrens <tbehrens@suse.com>2013-08-13 11:05:01 +0200
commit7a66bd77131ebae661887c561168f513ca5a5052 (patch)
tree372870721e7672eee28e82bacee281b1d207555b /slideshow
parent774b6899172b2f803898655103d6653ef2261cfd (diff)
Fix fdo#67908 - keep Visual around until after GL context is created.
Change-Id: Ie84decdccfa5bbf44c9cb05e2c2229f7384c1912
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 65c992af600e..23c10a03a182 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -578,7 +578,6 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
vi = glXGetVisualFromFBConfig( GLWin.dpy, fbconfigs[i] );
mbHasTFPVisual = true;
pChildSysData = lcl_createSystemWindow( vi, pPWindow, &pWindow );
- XFree ( vi );
SAL_INFO("slideshow.opengl", "found visual suitable for texture_from_pixmap");
} else if( firstVisual && pAttributeTable[1] == NULL ) {
vi = firstVisual;
@@ -599,7 +598,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
}
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
- if ( firstVisual )
+ if ( firstVisual && vi != firstVisual )
XFree (firstVisual);
#endif
@@ -681,6 +680,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
GLWin.vi,
0,
GL_TRUE);
+ XFree ( GLWin.vi );
if( GLWin.ctx == NULL ) {
SAL_INFO("slideshow.opengl", "unable to create GLX context");
return false;