X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fgltrace_state.cpp;h=031b5cceb431155a480eebc1d0dd2dd84fde7a8c;hb=d4dd924850e6fb3b7d150299d08b6d488ff1023a;hp=5c7ad1bf66ae242cfe1092ecf8459dcc80814f3a;hpb=e364ef83302847435ee03cd9ef78c7d29db72622;p=apitrace diff --git a/wrappers/gltrace_state.cpp b/wrappers/gltrace_state.cpp index 5c7ad1b..031b5cc 100644 --- a/wrappers/gltrace_state.cpp +++ b/wrappers/gltrace_state.cpp @@ -57,15 +57,13 @@ public: } }; -static os::thread_specific_ptr 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; @@ -96,7 +94,7 @@ static bool _releaseContext(context_ptr_t ctx) */ bool releaseContext(uintptr_t context_id) { - bool res; + bool res = false; context_map_mutex.lock(); /*