The program crashed because of empty global contour.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-03-28 17:18:38 +03:00
parent 0d4c6c2208
commit 7328b207b7

View File

@ -307,6 +307,10 @@ const QPointF &VContour::at(int i) const
QRectF VContour::BoundingRect() const
{
QVector<QPointF> points = GetContour();
if (points.isEmpty())
{
return QRectF();
}
points.append(points.first());
return QPolygonF(points).boundingRect();
}