From 2adf86d21d42f7d225e0d2188109fbd031989cf4 Mon Sep 17 00:00:00 2001 From: Stefano Facchini Date: Fri, 20 Oct 2017 22:40:38 +0200 Subject: Unset the current tool early on shutdown. Before this commit, when the application is terminated we call the ::finish() method for the current tool, only after deleting the selection and other objects. But it may happen that the tool's finish() assume that the selection is still alive, making the application crash. (For instance, with the Bezier tool when the path is still not closed). Instead, unset the current tool early, when the Desktop object is removed from the application, before calling its ::destroy() method. --- src/inkscape.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index e7e93929b..b30d06168 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -864,6 +864,8 @@ Application::remove_desktop (SPDesktop * desktop) g_error("Attempted to remove desktop not in list."); } + desktop->setEventContext(""); + if (DESKTOP_IS_ACTIVE (desktop)) { signal_deactivate_desktop.emit(desktop); if (_desktops->size() > 1) { -- cgit v1.2.3