]> git.cworth.org Git - apitrace/blobdiff - retrace/glretrace_ws.cpp
Cleanup README formatting.
[apitrace] / retrace / glretrace_ws.cpp
index 5ae908fc6c75a3cfffee7fb1d33077f65b090c95..ac03fcc97de6d56390f807a3b1661e6571d489c1 100644 (file)
@@ -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) {