[PATCH v4 18/19] don't call glGetError if there is no active context

Imre Deak imre.deak at intel.com
Thu Jun 14 08:55:26 PDT 2012


Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 retrace/glretrace.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/retrace/glretrace.py b/retrace/glretrace.py
index a77892d..653ac9c 100644
--- a/retrace/glretrace.py
+++ b/retrace/glretrace.py
@@ -321,7 +321,7 @@ class GlRetracer(Retracer):
             print '    glretrace::insideGlBeginEnd = true;'
         elif function.name.startswith('gl'):
             # glGetError is not allowed inside glBegin/glEnd
-            print '    if (retrace::debug && !glretrace::insideGlBeginEnd) {'
+            print '    if (retrace::debug && !glretrace::insideGlBeginEnd && glretrace::getCurrentContext()) {'
             print '        glretrace::checkGlError(call);'
             if function.name in ('glProgramStringARB', 'glProgramStringNV'):
                 print r'        GLint error_position = -1;'
-- 
1.7.5.4



More information about the apitrace mailing list