Do not try to destroy a GLX context when there is none, e.g. when glXCreateContextAttribsARB is not there.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@785 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2009-02-28 17:09:15 +00:00
parent d04fb4c03c
commit 5ad587d208

View File

@ -1025,7 +1025,8 @@ void fgCloseWindow( SFG_Window* window )
{
#if TARGET_HOST_POSIX_X11
glXDestroyContext( fgDisplay.Display, window->Window.Context );
if( window->Window.Context )
glXDestroyContext( fgDisplay.Display, window->Window.Context );
XFree( window->Window.FBConfig );
XDestroyWindow( fgDisplay.Display, window->Window.Handle );
/* XFlush( fgDisplay.Display ); */ /* XXX Shouldn't need this */