X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_internal.h;h=5b23df1659c2d99109d4773022f8606637737dd4;hb=4166c6ebc97701e0528fd81b7810131183940653;hp=a032851ba70db260fdc869fb1ef9597f5c0cad83;hpb=f5bee040bbdedfec9c90fd211d302962bfd3aab9;p=freeglut diff --git a/src/freeglut_internal.h b/src/freeglut_internal.h index a032851..5b23df1 100644 --- a/src/freeglut_internal.h +++ b/src/freeglut_internal.h @@ -651,8 +651,13 @@ extern SFG_State fgState; * A call to those macros assures us that there is a current * window and menu set, respectively: */ -#define freeglut_assert_window assert( fgStructure.Window != NULL ); #define freeglut_assert_menu assert( fgStructure.Menu != NULL ); +#define FREEGLUT_EXIT_IF_NO_WINDOW( string ) \ + if ( ! fgStructure.Window ) \ + { \ + fgError ( " ERROR: Function <%s> called" \ + " with no current window defined.", (string) ) ; \ + } /* * The deinitialize function gets called on glutMainLoop() end. It should clean up