HGLRC context;
int attribs[7];
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
+ const char * pWglExtString;
/* If nothing fancy has been required, leave the context as it is */
if ( fgState.MajorVersion == 1 && fgState.MinorVersion == 0 && fgState.ContextFlags == 0 )
return;
}
- const char * pWglExtString=wglGetEntensionsStringARB(window->Window.Device);
+ pWglExtString=wglGetEntensionsStringARB(window->Window.Device);
if (( pWglExtString == NULL ) || ( strstr(pWglExtString, "WGL_ARB_create_context") == NULL ))
{
return;
{
#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 */