From: José Fonseca Date: Tue, 11 Oct 2011 18:33:22 +0000 (+0100) Subject: Fix retracing of wglShareLists for currently bound contexts. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=96d9dda5334c63cbe46ecc654bf76167541d537a;p=apitrace Fix retracing of wglShareLists for currently bound contexts. --- diff --git a/glretrace_wgl.cpp b/glretrace_wgl.cpp index 7df2485..8f6a624 100644 --- a/glretrace_wgl.cpp +++ b/glretrace_wgl.cpp @@ -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; } }