error when entering main loop with no windows defined, as GLUT does
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1552 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
9fa8bcf4db
commit
7365dc38d4
@ -227,6 +227,7 @@ Error(const char *fmt, va_list ap)
|
||||
|
||||
/* print warning message */
|
||||
vprintf(fmt, ap);
|
||||
printf("\n");
|
||||
|
||||
/* terminate program, after pause for input so user can see */
|
||||
printf ( "Please enter something to exit: " );
|
||||
|
@ -414,6 +414,9 @@ void FGAPIENTRY glutMainLoop( void )
|
||||
|
||||
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMainLoop" );
|
||||
|
||||
if (!fgStructure.Windows.First)
|
||||
fgError(" ERROR: glutMainLoop called with no windows created.");
|
||||
|
||||
fgPlatformMainLoopPreliminaryWork ();
|
||||
|
||||
fgState.ExecState = GLUT_EXEC_STATE_RUNNING ;
|
||||
|
Reference in New Issue
Block a user