Fix Valentina crash.

Valentina crashes after uniting two pieces.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-07-26 11:54:06 +03:00
parent 1fff49936b
commit 457c27dbda

View File

@ -807,7 +807,17 @@ void VToolSeamAllowance::paint(QPainter *painter, const QStyleOptionGraphicsItem
//---------------------------------------------------------------------------------------------------------------------
QRectF VToolSeamAllowance::boundingRect() const
{
const VPiece detail = VAbstractTool::data.GetPiece(id);
VPiece detail;
try
{
detail = VAbstractTool::data.GetPiece(id);
}
catch(const VExceptionBadId &)
{
return QRectF();
}
return detail.MainPathPath(this->getData()).boundingRect();
}