git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1641
7f0cb862-5218-0410-a997-
914c9d46530a
/* Perform work on the window (position, reshape, display, etc) */
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( );
}