From 9e756b17d58b2991a8f4735c14d40a5843fc7db7 Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sat, 17 Dec 2011 13:10:59 +0000 Subject: [PATCH] Making the check for a current window in "glutPostRedisplay" more stringent git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@955 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_display.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freeglut_display.c b/src/freeglut_display.c index 601375b..2ba0ec5 100644 --- a/src/freeglut_display.c +++ b/src/freeglut_display.c @@ -36,7 +36,12 @@ 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; } -- 1.7.10.4