diff --git a/src/app/commands/cmd_set_ink_type.cpp b/src/app/commands/cmd_set_ink_type.cpp index 824cfd2ef..c0c04f12a 100644 --- a/src/app/commands/cmd_set_ink_type.cpp +++ b/src/app/commands/cmd_set_ink_type.cpp @@ -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