]> git.cworth.org Git - apitrace/blobdiff - wrappers/gltrace_state.cpp
gui: Fix crash on trigger actions without loaded trace-file.
[apitrace] / wrappers / gltrace_state.cpp
index 023d09e3e32d5bcd859a199349caf488ffe9249c..68bda100354db46025c678618d3d66f2a9d6749e 100644 (file)
@@ -57,15 +57,13 @@ public:
     }
 };
 
-static os::thread_specific_ptr<struct ThreadState> thread_state;
+static thread_specific ThreadState *thread_state;
 
 static ThreadState *get_ts(void)
 {
-    ThreadState *ts = thread_state.get();
-
+    ThreadState *ts = thread_state;
     if (!ts) {
-        ts = new ThreadState;
-        thread_state.reset(ts);
+        thread_state = ts = new ThreadState;
     }
 
     return ts;