Added double underscores to the header included macros.
[freeglut] / src / freeglut_init.c
index eb0935b..3399289 100644 (file)
@@ -75,6 +75,7 @@ SFG_State fgState = { { -1, -1, FALSE },  /* Position */
 #endif
                       { NULL, NULL }, /* Timers */
                       NULL, /* IdleCallback */
+                      FALSE, /* BuildingAMenu */
                       NULL, /* MenuStateCallback */
                       NULL, /* MenuStatusCallback */
                       { 640, 480, TRUE }, /* GameModeSize */
@@ -269,6 +270,15 @@ void fgDeinitialize( void )
     }
 
     /*
+     * If there was a menu created, destroy the rendering context
+     */
+    if ( fgStructure.MenuContext )
+    {
+      free ( fgStructure.MenuContext ) ;
+      fgStructure.MenuContext = NULL ;
+    }
+
+    /*
      * Perform the freeglut structure deinitialization
      */
     fgDestroyStructure();