X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_init.c;h=33992898e44bda292607d72e0335cd92b4e17946;hb=8e06738e2a2879e125fa166f6f7817727d898beb;hp=eb0935b680c2e064afdf3c29a361907a99c263b1;hpb=9b943faa4f374b5a37b1bf6d544f826078cd361b;p=freeglut diff --git a/src/freeglut_init.c b/src/freeglut_init.c index eb0935b..3399289 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -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();