diff --git a/src/app/ui/editor/tool_loop_impl.cpp b/src/app/ui/editor/tool_loop_impl.cpp index 7a9648274..23011fc98 100644 --- a/src/app/ui/editor/tool_loop_impl.cpp +++ b/src/app/ui/editor/tool_loop_impl.cpp @@ -360,15 +360,26 @@ tools::ToolLoop* create_tool_loop(Editor* editor, Context* context, MouseMessage } // Create the new tool loop - return - new ToolLoopImpl(editor, - context, - current_tool, - editor->getDocument(), - msg->left() ? tools::ToolLoop::Left: - tools::ToolLoop::Right, - msg->left() ? fg: bg, - msg->left() ? bg: fg); + try + { + return new ToolLoopImpl(editor, + context, + current_tool, + editor->getDocument(), + msg->left() ? tools::ToolLoop::Left: + tools::ToolLoop::Right, + msg->left() ? fg: bg, + msg->left() ? bg: fg); + } + catch (const std::exception& ex) + { + Alert::show(PACKAGE + "<