From 3ee3fbd9cb2ce26e1472d2020dcd2a7b124b1fb3 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 29 Nov 2016 16:59:48 +0200 Subject: [PATCH] Improve validation custom seam allowance records. --HG-- branch : feature --- src/libs/vpatterndb/vpiece.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/vpatterndb/vpiece.cpp b/src/libs/vpatterndb/vpiece.cpp index 2f7ccf040..a59bf6a5f 100644 --- a/src/libs/vpatterndb/vpiece.cpp +++ b/src/libs/vpatterndb/vpiece.cpp @@ -332,7 +332,11 @@ QVector VPiece::GetValidRecords() const { const CustomSARecord &record = d->m_customSARecords.at(i); - if (record.startPoint > NULL_ID && record.path > NULL_ID && record.endPoint > NULL_ID) + if (record.startPoint > NULL_ID + && record.path > NULL_ID + && record.endPoint > NULL_ID + && d->m_path.indexOfNode(record.startPoint) != -1 + && d->m_path.indexOfNode(record.endPoint) != -1) { records.append(record); }