X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/36ca94a260b93ca35c5d5a09edfb8e104be0d694..1721a8c028d3b6a553634c632117fbfac102a30e:/contrib/src/ogl/basic2.cpp diff --git a/contrib/src/ogl/basic2.cpp b/contrib/src/ogl/basic2.cpp index 658d93a725..9a7f31f6a7 100644 --- a/contrib/src/ogl/basic2.cpp +++ b/contrib/src/ogl/basic2.cpp @@ -71,10 +71,10 @@ void wxPolygonShape::Create(wxList *the_points) else { m_originalPoints = the_points; - + // Duplicate the list of points m_points = new wxList; - + wxObjectList::compatibility_iterator node = the_points->GetFirst(); while (node) { @@ -1774,7 +1774,7 @@ wxShapeRegion::wxShapeRegion() m_actualPenObject = NULL; } -wxShapeRegion::wxShapeRegion(wxShapeRegion& region) +wxShapeRegion::wxShapeRegion(wxShapeRegion& region):wxObject() { m_regionText = region.m_regionText; m_regionName = region.m_regionName; @@ -1819,9 +1819,9 @@ void wxShapeRegion::ClearText() while (node) { wxShapeTextLine *line = (wxShapeTextLine *)node->GetData(); - wxNode *next = node->GetNext(); + wxObjectList::compatibility_iterator next = node->GetNext(); delete line; - delete node; + m_formattedText.Erase(node); node = next; } }