Fix crash in dialog Seeam allowance tool.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-01-25 10:32:40 +02:00
parent 2bf477ca8a
commit 762f88579a

View File

@ -537,13 +537,13 @@ bool DialogTool::DoublePoints(QListWidget *listWidget, const VContainer *data)
const VPieceNode secondNode = RowNode(listWidget, FindNotExcludedNodeDown(listWidget, firstIndex+1)); const VPieceNode secondNode = RowNode(listWidget, FindNotExcludedNodeDown(listWidget, firstIndex+1));
QSharedPointer<VPointF> firstPoint; QSharedPointer<VPointF> firstPoint;
if (firstNode.GetTypeTool() == Tool::NodePoint) if (firstNode.GetTypeTool() == Tool::NodePoint && not (firstNode.GetId() == NULL_ID))
{ {
firstPoint = data->GeometricObject<VPointF>(firstNode.GetId()); firstPoint = data->GeometricObject<VPointF>(firstNode.GetId());
} }
QSharedPointer<VPointF> secondPoint; QSharedPointer<VPointF> secondPoint;
if (secondNode.GetTypeTool() == Tool::NodePoint) if (secondNode.GetTypeTool() == Tool::NodePoint && not (secondNode.GetId() == NULL_ID))
{ {
secondPoint = data->GeometricObject<VPointF>(secondNode.GetId()); secondPoint = data->GeometricObject<VPointF>(secondNode.GetId());
} }