]> git.cworth.org Git - apitrace/commitdiff
Fix retracing of wglShareLists for currently bound contexts.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Tue, 11 Oct 2011 18:33:22 +0000 (19:33 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Tue, 11 Oct 2011 19:29:36 +0000 (20:29 +0100)
glretrace_wgl.cpp

index 7df2485e0737982327785dc8343b67727ed3dde2..8f6a6243431673aa41dcf9c6ae9a104fff320ec1 100644 (file)
@@ -116,8 +116,13 @@ static void retrace_wglShareLists(Trace::Call &call) {
     glws::Context *new_context =
         glws::createContext(old_context->visual, share_context);
     if (new_context) {
-        delete old_context;
+        if (context == old_context) {
+            glws::makeCurrent(drawable, new_context);
+        }
+
         context_map[hglrc2] = new_context;
+        
+        delete old_context;
     }
 }