Making the check for a current window in "glutPostRedisplay" more stringent
[freeglut] / src / freeglut_display.c
index 601375b..2ba0ec5 100644 (file)
 void FGAPIENTRY glutPostRedisplay( void )
 {
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostRedisplay" );
-    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutPostRedisplay" );
+    if ( ! fgStructure.CurrentWindow )
+       {
+      fgError ( " ERROR:  Function <%s> called"
+                " with no current window defined.", "glutPostRedisplay" ) ;
+       }
+
     fgStructure.CurrentWindow->State.Redisplay = GL_TRUE;
 }