]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxCHECKED_DELETE in wxScopedPtr::reset().
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 6 May 2010 05:42:57 +0000 (05:42 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 6 May 2010 05:42:57 +0000 (05:42 +0000)
It was only used in delete call in destructor, but the use in  reset()
needs safeguards as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/scopedptr.h

index bfe98de16e5afc9c59f7b668e7b48bdd5b462b9e..8faa383c89245b83091983468b25c2fe2b7b09d4 100644 (file)
@@ -63,7 +63,7 @@ public:
     {
         if ( ptr != m_ptr )
         {
-            delete m_ptr;
+            wxCHECKED_DELETE(m_ptr);
             m_ptr = ptr;
         }
     }
@@ -133,7 +133,7 @@ public:                             \
     {                               \
         if (m_ptr != ptr)           \
         {                           \
-            delete m_ptr;           \
+            wxCHECKED_DELETE(m_ptr);\
             m_ptr = ptr;            \
         }                           \
     }                               \