Return from DoDrawSpline without doing anything (like segfaulting
<wink!>) if the list is empty. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -316,6 +316,10 @@ void wxDCBase::DoDrawSpline( wxList *points )
|
|||||||
double x1, y1, x2, y2;
|
double x1, y1, x2, y2;
|
||||||
|
|
||||||
wxList::compatibility_iterator node = points->GetFirst();
|
wxList::compatibility_iterator node = points->GetFirst();
|
||||||
|
if (node == NULL)
|
||||||
|
// empty list
|
||||||
|
return;
|
||||||
|
|
||||||
p = (wxPoint *)node->GetData();
|
p = (wxPoint *)node->GetData();
|
||||||
|
|
||||||
x1 = p->x;
|
x1 = p->x;
|
||||||
|
Reference in New Issue
Block a user