X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9a4f2295344414e2ee4e3ec27fa5292918dff27..661698e54f2bc599dc1a961ffbae08ccdd6b9b97:/include/wx/sharedptr.h diff --git a/include/wx/sharedptr.h b/include/wx/sharedptr.h index 279e29b3a3..290c610adc 100644 --- a/include/wx/sharedptr.h +++ b/include/wx/sharedptr.h @@ -115,8 +115,7 @@ private: { if (m_ref) { - wxAtomicDec( m_ref->m_count ); - if (m_ref->m_count == 0) + if (!wxAtomicDec( m_ref->m_count )) { delete m_ref->m_ptr; delete m_ref;