Making the check for a current window in "glutPostRedisplay" more stringent

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@955 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-12-17 13:10:59 +00:00
parent ae998b54d5
commit 681299bdf1

View File

@ -36,7 +36,12 @@
void FGAPIENTRY glutPostRedisplay( void ) void FGAPIENTRY glutPostRedisplay( void )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostRedisplay" ); 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; fgStructure.CurrentWindow->State.Redisplay = GL_TRUE;
} }