variable wasn't declared before rest of function. Thanks Markus Israelsson and Vinnie

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1841 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2018-03-27 07:41:18 +00:00
parent b8a9827c5b
commit 20e9df4141

View File

@ -801,12 +801,13 @@ static void fghCreateMenuCallback( int menu, FGCBUserData userData )
int FGAPIENTRY glutCreateMenu( FGCBMenu callback ) int FGAPIENTRY glutCreateMenu( FGCBMenu callback )
{ {
FGCBMenu* reference;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" );
if (!callback) if (!callback)
{ {
return glutCreateMenuUcall( NULL, NULL ); return glutCreateMenuUcall( NULL, NULL );
} }
FGCBMenu* reference = &callback; reference = &callback;
return glutCreateMenuUcall( fghCreateMenuCallback, *((FGCBUserData*)reference) ); return glutCreateMenuUcall( fghCreateMenuCallback, *((FGCBUserData*)reference) );
} }