From 1cc603cf759f9cc544fb9a7c35d94e47e7674545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 9 Nov 2006 20:38:14 +0000 Subject: [PATCH] Abort if there are problems with setting up OpenGL context. svn path=/branches/work/kwin_composite/; revision=603712 --- scene_opengl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 8b23cc5c78..f378299c92 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -191,7 +191,8 @@ SceneOpenGL::SceneOpenGL( Workspace* ws ) << QString::number( vis_drawable, 16 ) << endl; ctxbuffer = glXCreateNewContext( display(), fbcbuffer, GLX_RGBA_TYPE, NULL, GL_FALSE ); ctxdrawable = glXCreateNewContext( display(), fbcdrawable, GLX_RGBA_TYPE, ctxbuffer, GL_FALSE ); - glXMakeContextCurrent( display(), glxbuffer, glxbuffer, ctxbuffer ); + if( !glXMakeContextCurrent( display(), glxbuffer, glxbuffer, ctxbuffer ) ) + assert( false ); // Initialize OpenGL initGL();