summaryrefslogtreecommitdiff
path: root/wrappers/gltrace.py
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-11-20 23:23:05 +0000
committerJose Fonseca <jfonseca@vmware.com>2015-11-23 22:19:57 +0000
commitc4cf34616e7fcf726438ae69a4415338430ebd02 (patch)
tree5422ff7d64c43c9bc4239623e68c0a1c99825544 /wrappers/gltrace.py
parent0e781b61e61b065ca9f3b05ed01b0ef1d9855010 (diff)
gltrace: Catch recursion in *GetProcAddres*
Diffstat (limited to 'wrappers/gltrace.py')
-rw-r--r--wrappers/gltrace.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py
index 5c7d22b8..769f2e34 100644
--- a/wrappers/gltrace.py
+++ b/wrappers/gltrace.py
@@ -315,6 +315,7 @@ class GlTracer(Tracer):
ptype = function_pointer_type(function)
pvalue = function_pointer_value(function)
print ' if (strcmp("%s", (const char *)procName) == 0) {' % function.name
+ print ' assert(procPtr != (%s)&%s);' % (retType, function.name)
print ' %s = (%s)procPtr;' % (pvalue, ptype)
print ' return (%s)&%s;' % (retType, function.name,)
print ' }'