X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9a4f2295344414e2ee4e3ec27fa5292918dff27..9c34a216817028bc533e07873d047208a96b05a2:/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;