Merge remote-tracking branch 'svn/trunk' into git_master

This commit is contained in:
Diederick C. Niehorster 2018-03-27 09:41:53 +02:00
commit 4bc7de3645

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) );
} }