diff --git a/src/util/thread.h b/src/util/thread.h index 23b6ce971..16b3e4da1 100644 --- a/src/util/thread.h +++ b/src/util/thread.h @@ -166,7 +166,7 @@ public: T * m_ptr; public: thread_specific_ptr():m_ptr(nullptr) {} - ~thread_specific_ptr() { if (m_ptr) delete m_ptr; } + ~thread_specific_ptr() { if (m_ptr) delete m_ptr; m_ptr = nullptr; } T * get() const { return m_ptr; } void reset(T * ptr) { if (m_ptr) delete m_ptr; m_ptr = ptr; } T * operator->() const { return m_ptr; }