Fix Set Ink Type command crash when it is executed without UI

This commit is contained in:
Gaspar Capello 2019-10-15 15:59:10 -03:00 committed by David Capello
parent 66ccf51eb9
commit 558943ebec

View File

@ -65,9 +65,8 @@ bool SetInkTypeCommand::onChecked(Context* context)
void SetInkTypeCommand::onExecute(Context* context)
{
App::instance()
->contextBar()
->setInkType(m_type);
if (App::instance()->contextBar() != nullptr)
App::instance()->contextBar()->setInkType(m_type);
}
std::string SetInkTypeCommand::onGetFriendlyName() const