From b54291284070b29a81b426cba72e352ead49d856 Mon Sep 17 00:00:00 2001 From: fayjf 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: https://svn.code.sf.net/p/freeglut/code/trunk@887 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_internal.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_internal.h b/freeglut/freeglut/src/freeglut_internal.h index 2f3155b..2a5a4db 100644 --- a/freeglut/freeglut/src/freeglut_internal.h +++ b/freeglut/freeglut/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) ) ; \ } /*