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:
parent
d04fb4c03c
commit
5ad587d208
@ -1025,7 +1025,8 @@ void fgCloseWindow( SFG_Window* window )
|
|||||||
{
|
{
|
||||||
#if TARGET_HOST_POSIX_X11
|
#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 );
|
XFree( window->Window.FBConfig );
|
||||||
XDestroyWindow( fgDisplay.Display, window->Window.Handle );
|
XDestroyWindow( fgDisplay.Display, window->Window.Handle );
|
||||||
/* XFlush( fgDisplay.Display ); */ /* XXX Shouldn't need this */
|
/* XFlush( fgDisplay.Display ); */ /* XXX Shouldn't need this */
|
||||||
|
Reference in New Issue
Block a user