Fixed issue #775. Insert node tool craches.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-12-04 13:35:58 +02:00
parent a4df5612d9
commit a0ec8ecb64
2 changed files with 8 additions and 2 deletions

View File

@ -172,7 +172,10 @@ bool SavePieceOptions::mergeWith(const QUndoCommand *command)
const QVector<VPieceNode> nodes = m_newDet.GetPath().GetNodes();
const QVector<VPieceNode> candidateNodes = candidate.GetPath().GetNodes();
SCASSERT(nodes.size() == candidateNodes.size())
if (nodes.size() != candidateNodes.size())
{
return false;
}
for (int i = 0; i < nodes.size(); ++i)
{

View File

@ -143,7 +143,10 @@ bool SavePiecePathOptions::mergeWith(const QUndoCommand *command)
const QVector<VPieceNode> nodes = m_newPath.GetNodes();
const QVector<VPieceNode> candidateNodes = candidate.GetNodes();
SCASSERT(nodes.size() == candidateNodes.size())
if (nodes.size() == candidateNodes.size())
{
return false;
}
for (int i = 0; i < nodes.size(); ++i)
{