diff options
| author | Stefano Facchini <stefano.facchini@gmail.com> | 2017-10-20 20:40:38 +0000 |
|---|---|---|
| committer | Stefano Facchini <stefano.facchini@gmail.com> | 2017-11-13 09:28:49 +0000 |
| commit | 2adf86d21d42f7d225e0d2188109fbd031989cf4 (patch) | |
| tree | 7fa2675fe92d4d05d31aa410d50d6b0934b17f0e /src/widgets/desktop-widget.cpp | |
| parent | Refactor SPDesktop::setEventContext to allow for unsetting the current tool (diff) | |
| download | inkscape-2adf86d21d42f7d225e0d2188109fbd031989cf4.tar.gz inkscape-2adf86d21d42f7d225e0d2188109fbd031989cf4.zip | |
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.
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 571f920bf..f9c8e4ac6 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -736,10 +736,9 @@ static void sp_desktop_widget_dispose(GObject *object) g_signal_handlers_disconnect_by_func (G_OBJECT (dtw->canvas), (gpointer) G_CALLBACK (sp_desktop_widget_event), dtw); g_signal_handlers_disconnect_by_func (G_OBJECT (dtw->canvas_tbl), (gpointer) G_CALLBACK (canvas_tbl_size_allocate), dtw); - dtw->layer_selector->setDesktop(NULL); dtw->layer_selector->unreference(); - INKSCAPE.remove_desktop (dtw->desktop); // clears selection too + INKSCAPE.remove_desktop(dtw->desktop); // clears selection and event_context dtw->modified_connection.disconnect(); dtw->desktop->destroy(); Inkscape::GC::release (dtw->desktop); |
