From 82fef7ef19cb97e2b99b6a463878f8b5d607ec67 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Wed, 4 Jul 2007 01:29:13 +0000 Subject: [PATCH] prevent crashes by disconnecting signals on destroy --- src/ui/widget/filter-effect-chooser.cpp | 6 ++++++ src/ui/widget/filter-effect-chooser.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/widget/filter-effect-chooser.cpp b/src/ui/widget/filter-effect-chooser.cpp index fd8f46e04..06a6e833e 100644 --- a/src/ui/widget/filter-effect-chooser.cpp +++ b/src/ui/widget/filter-effect-chooser.cpp @@ -33,6 +33,12 @@ FilterEffectChooser::FilterEffectChooser() on_activate_desktop(INKSCAPE, SP_ACTIVE_DESKTOP, this); } +FilterEffectChooser::~FilterEffectChooser() +{ + _resource_changed.disconnect(); + _doc_replaced.disconnect(); +} + void FilterEffectChooser::on_activate_desktop(Inkscape::Application*, SPDesktop* desktop, FilterEffectChooser* fec) { fec->update_filters(); diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h index 182ce45ef..05f9faf32 100644 --- a/src/ui/widget/filter-effect-chooser.h +++ b/src/ui/widget/filter-effect-chooser.h @@ -29,7 +29,7 @@ namespace Widget { class FilterEffectChooser { public: - virtual ~FilterEffectChooser() {} + virtual ~FilterEffectChooser(); virtual Glib::SignalProxy0 signal_selection_changed() = 0; virtual SPFilter* get_selected_filter() = 0; -- 2.30.2