Merge branch 'svn/trunk'

This commit is contained in:
Diederick Niehorster 2014-01-22 18:10:15 +08:00
commit 7047fbbad0

View File

@ -465,6 +465,13 @@ void FGAPIENTRY glutMainLoopEvent( void )
/* Perform work on the window (position, reshape, display, etc) */ /* Perform work on the window (position, reshape, display, etc) */
fghProcessWork( ); fghProcessWork( );
/* Check OpenGL error state if requested.
* Don't call if no more open windows (can happen if user closes window from
* title bar), would lead to infinite error loop in glutReportErrors
*/
if (fgState.GLDebugSwitch && fgStructure.CurrentWindow)
glutReportErrors( );
fgCloseWindows( ); fgCloseWindows( );
} }