]> git.cworth.org Git - apitrace/blobdiff - wrappers/gltrace_state.cpp
os_posix: Print complete, attempted command line when execute() fails
[apitrace] / wrappers / gltrace_state.cpp
index 9fcc56e2e5a68c7e67902aacf5001937fef388b3..023d09e3e32d5bcd859a199349caf488ffe9249c 100644 (file)
@@ -115,26 +115,22 @@ bool releaseContext(uintptr_t context_id)
 
 void createContext(uintptr_t context_id)
 {
+    // wglCreateContextAttribsARB causes internal calls to wglCreateContext to be
+    // traced, causing context to be defined twice.
+    if (context_map.find(context_id) != context_map.end()) {
+        return;
+    }
+
     context_ptr_t ctx(new Context);
 
     context_map_mutex.lock();
 
     _retainContext(ctx);
-    assert(context_map.find(context_id) == context_map.end());
     context_map[context_id] = ctx;
 
     context_map_mutex.unlock();
 }
 
-/*
- * return true if the context has been destroyed, false otherwise. See
- * the note at releaseContext about the actual ccontext lifetime.
- */
-bool destroyContext(uintptr_t context_id)
-{
-    return releaseContext(context_id);
-}
-
 void setContext(uintptr_t context_id)
 {
     ThreadState *ts = get_ts();