--- a/src/drivers/video_glx.c Tue Jan 15 20:50:23 2008 +0000 +++ b/src/drivers/video_glx.c Sat Jan 26 02:45:27 2008 +0000 @@ -32,7 +32,7 @@ static gboolean glsl_loaded = FALSE; static int glx_version = 100; -static XVisualInfo *glx_visual; +static XVisualInfo *glx_visual = NULL; static GLXFBConfig glx_fbconfig; static GLXContext glx_context = NULL; static gboolean glx_is_initialized = FALSE; @@ -100,7 +100,7 @@ glx_pbuffer_supported = (glx_version >= 103 || isServerGLXExtensionSupported(display, screen, "GLX_SGIX_pbuffer") ); - + if( glx_fbconfig_supported ) { int nelem; int fb_attribs[] = { GLX_DRAWABLE_TYPE, @@ -125,6 +125,11 @@ int attribs[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, 0 }; glx_visual = glXChooseVisual( display, screen, attribs ); } + + if( glx_visual == NULL ) { + return FALSE; + } + glx_is_initialized = TRUE; return TRUE; }