Fix Valentina's crash.

Valentina crashes when delete several selected pieces.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-01-30 10:31:50 +02:00
parent 3bdf60705d
commit 0cfe0b5936

View File

@ -1862,7 +1862,7 @@ QList<VToolSeamAllowance *> VToolSeamAllowance::SelectedTools() const
for(int i=0; i < list.size(); ++i)
{
VToolSeamAllowance *tool = qgraphicsitem_cast<VToolSeamAllowance *>(list.at(i));
if (tool->getId() != m_id)
if (tool != nullptr && tool->getId() != m_id)
{
tools.append(tool);
}