diff --git a/src/commands/CommandHandler.cpp b/src/commands/CommandHandler.cpp index f3da17635..079163a2c 100644 --- a/src/commands/CommandHandler.cpp +++ b/src/commands/CommandHandler.cpp @@ -53,7 +53,10 @@ void CommandHandler::OnReceiveCommand(AppCommandEvent &event) // Then apply it to current application & project. Note that the // command may change the context - for example, switching to a // different project. - cmd->Apply(*mCurrentContext); + auto result = GuardedCall( [&] { + return cmd->Apply(*mCurrentContext); + }); + wxUnusedVar(result); // Redraw the project mCurrentContext->GetProject()->RedrawProject();