X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..a685dd314cc5daeb1492a4a57f475df91d6cd126:/contrib/src/deprecated/prop.cpp diff --git a/contrib/src/deprecated/prop.cpp b/contrib/src/deprecated/prop.cpp index c77d63fd28..7f7d122551 100644 --- a/contrib/src/deprecated/prop.cpp +++ b/contrib/src/deprecated/prop.cpp @@ -1024,15 +1024,14 @@ bool wxPropertySheet::HasProperty(const wxString& name) const // Clear all properties void wxPropertySheet::Clear(void) { - wxObjectList::compatibility_iterator node = m_properties.GetFirst(); - while (node) - { - wxProperty *prop = (wxProperty *)node->GetData(); - wxObjectList::compatibility_iterator next = node->GetNext(); - delete prop; - delete node; - node = next; - } + wxObjectList::compatibility_iterator node = m_properties.GetFirst(); + while (node) + { + wxProperty *prop = (wxProperty *)node->GetData(); + delete prop; + node = node->GetNext(); + } + m_properties.Clear(); } // Sets/clears the modified flag for each property value