X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f65e33794fca0c936227235515a40e7df5c56e3..1a6944fd74cfb70ace96d60bde31a7c8e0a5896d:/src/gtk/dc.cpp diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 9637082010..faba4faab6 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -136,11 +136,17 @@ void wxDC::DrawLines( wxList *list, long xoffset, long yoffset ) void wxDC::DrawSpline( long x1, long y1, long x2, long y2, long x3, long y3 ) { wxList list; - list.DeleteContents(TRUE); - list.Append( new wxPoint(x1, y1) ); - list.Append( new wxPoint(x2, y2) ); - list.Append( new wxPoint(x3, y3) ); + list.Append( (wxObject*)new wxPoint(x1, y1) ); + list.Append( (wxObject*)new wxPoint(x2, y2) ); + list.Append( (wxObject*)new wxPoint(x3, y3) ); DrawSpline(&list); + wxNode *node = list.First(); + while (node) + { + wxPoint *p = (wxPoint*)node->Data(); + delete p; + node = node->Next(); + }; }; void wxDC::DrawSpline( wxList *points )