From b104f0dfa570c169cacf9badd3d9cce678562159 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 28 Mar 2015 14:26:49 +0200 Subject: [PATCH] Fixed crash. If we have no points in the seam allowence path just don't show him. --HG-- branch : develop --- src/app/geometry/vdetail.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/app/geometry/vdetail.cpp b/src/app/geometry/vdetail.cpp index bfe8374c6..4169fcf68 100644 --- a/src/app/geometry/vdetail.cpp +++ b/src/app/geometry/vdetail.cpp @@ -462,15 +462,18 @@ QPainterPath VDetail::ContourPath(const VContainer *data) const // seam allowence if (getSeamAllowance() == true) { - QPainterPath ekv; - ekv.moveTo(pointsEkv.at(0)); - for (qint32 i = 1; i < pointsEkv.count(); ++i) + if (not pointsEkv.isEmpty()) { - ekv.lineTo(pointsEkv.at(i)); - } + QPainterPath ekv; + ekv.moveTo(pointsEkv.at(0)); + for (qint32 i = 1; i < pointsEkv.count(); ++i) + { + ekv.lineTo(pointsEkv.at(i)); + } - path.addPath(ekv); - path.setFillRule(Qt::WindingFill); + path.addPath(ekv); + path.setFillRule(Qt::WindingFill); + } } return path;