Check that number of points passed to wxDC::DrawSpline() is at least 2
DoDrawSpline() implementations for all ports work for the number of points >= 2 (for 2 points there is drawn a straight line) so we need to add checks whether this requirement is met. See #19172.
This commit is contained in:
@@ -1716,6 +1716,9 @@ void wxGtkPrinterDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCo
|
||||
#if wxUSE_SPLINES
|
||||
void wxGtkPrinterDCImpl::DoDrawSpline(const wxPointList *points)
|
||||
{
|
||||
wxCHECK_RET(points, "NULL pointer to spline points?");
|
||||
wxCHECK_RET(points->GetCount() >= 2, "incomplete list of spline points?");
|
||||
|
||||
SetPen (m_pen);
|
||||
|
||||
double c, d, x1, y1, x3, y3;
|
||||
|
Reference in New Issue
Block a user