X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fglretrace_ws.cpp;h=ac03fcc97de6d56390f807a3b1661e6571d489c1;hb=7a9fb5103e052150232b64cb5d99374cda3f1234;hp=5ae908fc6c75a3cfffee7fb1d33077f65b090c95;hpb=f74ad0d7b108d0b628e2290a4b6c597e9a13ee8e;p=apitrace diff --git a/retrace/glretrace_ws.cpp b/retrace/glretrace_ws.cpp index 5ae908f..ac03fcc 100644 --- a/retrace/glretrace_ws.cpp +++ b/retrace/glretrace_ws.cpp @@ -122,6 +122,15 @@ createContext(Context *shareContext) { } +Context::~Context() +{ + //assert(this != getCurrentContext()); + if (this != getCurrentContext()) { + delete wsContext; + } +} + + static thread_specific Context * currentContextPtr; @@ -153,9 +162,6 @@ makeCurrent(trace::Call &call, glws::Drawable *drawable, Context *context) return false; } - if (currentContext) { - currentContext->drawable = NULL; - } currentContextPtr = context; if (drawable && context) {