Fix a game mode crashing bug, conditional compilation for Windows, and comment out...
[freeglut] / src / freeglut_gamemode.c
index afa0e7a..09e38ab 100644 (file)
@@ -549,6 +549,8 @@ void FGAPIENTRY glutLeaveGameMode( void )
 
     fgAddToWindowDestroyList( fgStructure.GameMode );
 
+    fgStructure.GameMode = NULL ;
+
 #if TARGET_HOST_UNIX_X11
 
     XUngrabPointer( fgDisplay.Display, CurrentTime );