From 7c83ae64c3b43faf7f2f07fe86396475b9d9f718 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 12 Apr 2018 20:01:12 +0300 Subject: [PATCH] Fix inconsistent signal disconnection in arc toolbar Leaving the repr listener up while the selection signal was disconnected caused a crash when the attribute change callback was called with an old item pointer still stored in tbl. --- src/widgets/arc-toolbar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp index d19b8672c44..23ecad50a38 100644 --- a/src/widgets/arc-toolbar.cpp +++ b/src/widgets/arc-toolbar.cpp @@ -596,8 +596,10 @@ static void arc_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBa changed = desktop->getSelection()->connectChanged(sigc::bind(sigc::ptr_fun(sp_arc_toolbox_selection_changed), holder)); sp_arc_toolbox_selection_changed(desktop->getSelection(), holder); } else { - if (changed) + if (changed) { changed.disconnect(); + purge_repr_listener(NULL, holder); + } } } -- GitLab