Fixing bug report 2952457 -- modifying the "FREEGLUT_EXIT_IF_NO_WINDOW" macro so...
authorJohn F. Fay <johnffay@nettally.com>
Sun, 23 Jan 2011 22:30:13 +0000 (22:30 +0000)
committerJohn F. Fay <johnffay@nettally.com>
Sun, 23 Jan 2011 22:30:13 +0000 (22:30 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@887 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_internal.h

index 2f3155b..2a5a4db 100644 (file)
@@ -801,11 +801,12 @@ extern SFG_State fgState;
  * A call to those macros assures us that there is a current
  * window set, respectively:
  */
-#define  FREEGLUT_EXIT_IF_NO_WINDOW( string )                   \
-  if ( ! fgStructure.CurrentWindow )                            \
-  {                                                             \
-    fgError ( " ERROR:  Function <%s> called"                   \
-              " with no current window defined.", (string) ) ;  \
+#define  FREEGLUT_EXIT_IF_NO_WINDOW( string )                               \
+  if ( ! fgStructure.CurrentWindow &&                                       \
+       ( fgState.ActionOnWindowClose != GLUT_ACTION_CONTINUE_EXECUTION ) )  \
+  {                                                                         \
+    fgError ( " ERROR:  Function <%s> called"                               \
+              " with no current window defined.", (string) ) ;              \
   }
 
 /*