]> git.cworth.org Git - apitrace/blobdiff - retrace/glretrace_egl.cpp
Merge branch 'master' into mt-trace
[apitrace] / retrace / glretrace_egl.cpp
index 10c950b038d4f398457162c3caa086fc17d728c9..45855643f5b55272e494be1bcef8a799e26c928f 100644 (file)
@@ -127,6 +127,7 @@ static void retrace_eglDestroySurface(trace::Call &call) {
     it = drawable_map.find(orig_surface);
 
     if (it != drawable_map.end()) {
+        glretrace::Context *currentContext = glretrace::getCurrentContext();
         if (!currentContext || it->second != currentContext->drawable) {
             // TODO: reference count
             delete it->second;
@@ -202,6 +203,7 @@ static void retrace_eglDestroyContext(trace::Call &call) {
     it = context_map.find(orig_context);
 
     if (it != context_map.end()) {
+        glretrace::Context *currentContext = glretrace::getCurrentContext();
         if (it->second != currentContext) {
             // TODO: reference count
             delete it->second;