From 9e7870dea599149b2b94bd9c1af74eb15e682fb5 Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Thu, 27 Sep 2007 19:04:18 +0000 Subject: [PATCH] Don't try to use glx when it's not available. Fixes crash when glx is there at compile time but not at runtime. svn path=/trunk/KDE/kdebase/workspace/; revision=717942 --- compositingprefs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compositingprefs.cpp b/compositingprefs.cpp index ec7178c385..d21453f452 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -58,6 +58,12 @@ void CompositingPrefs::detect() } #ifdef HAVE_OPENGL + if( !Extensions::glxAvailable()) + { + kDebug( 1212 ) << "No GLX available"; + return; + } + // remember and later restore active context GLXContext oldcontext = glXGetCurrentContext(); GLXDrawable olddrawable = glXGetCurrentDrawable();