Added additional checks to method DialogTool::SetAssociatedTool.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-02 12:12:12 +03:00
parent 1f28154116
commit 49258cac8c

View File

@ -928,8 +928,16 @@ void DialogTool::Build(const Tool &type)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void DialogTool::SetAssociatedTool(VAbstractTool *tool) void DialogTool::SetAssociatedTool(VAbstractTool *tool)
{ {
this->associatedTool=tool; if (tool != nullptr)
SetToolId(tool->getId()); {
associatedTool = tool;
SetToolId(tool->getId());
}
else
{
associatedTool = nullptr;
SetToolId(NULL_ID);
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------