X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/664e13143ee51a6b1aa1c30d1401ac04b11bdcca..438959cca892a7651634cc3a7aad4819ac49b23c:/include/wx/sharedptr.h diff --git a/include/wx/sharedptr.h b/include/wx/sharedptr.h index 5bfd215136..290c610adc 100644 --- a/include/wx/sharedptr.h +++ b/include/wx/sharedptr.h @@ -3,7 +3,7 @@ // Purpose: Shared pointer based on the counted_ptr<> template, which // is in the public domain // Author: Robert Roebling, Yonat Sharon -// RCS-ID: $Id: object.h 47254 2007-07-09 10:09:52Z VS $ +// RCS-ID: $Id$ // Copyright: Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -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;