From f521b5feab611bd90fc299a9ebefcd8eba8328fe Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sun, 23 Jan 2011 22:30:13 +0000 Subject: [PATCH] Fixing bug report 2952457 -- modifying the "FREEGLUT_EXIT_IF_NO_WINDOW" macro so that it does not exit if the user has specified "GLUT_ACTION_CONTINUE_EXECUTION". 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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/freeglut_internal.h b/src/freeglut_internal.h index 2f3155b..2a5a4db 100644 --- a/src/freeglut_internal.h +++ b/src/freeglut_internal.h @@ -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) ) ; \ } /* -- 1.7.10.4