Code

prevent crashes by disconnecting signals on destroy
authorbuliabyak <buliabyak@users.sourceforge.net>
Wed, 4 Jul 2007 01:29:13 +0000 (01:29 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Wed, 4 Jul 2007 01:29:13 +0000 (01:29 +0000)
src/ui/widget/filter-effect-chooser.cpp
src/ui/widget/filter-effect-chooser.h

index fd8f46e0441611eac9c9810d7b932ba201826e58..06a6e833e10802fba971d1f028d19c16738597af 100644 (file)
@@ -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();
index 182ce45ef6b307f4ac4bd6611ba4920eceb9f9d6..05f9faf32685202d43509860c8dd1cf5a57849cb 100644 (file)
@@ -29,7 +29,7 @@ namespace Widget {
 class FilterEffectChooser
 {
 public:
-    virtual ~FilterEffectChooser() {}
+    virtual ~FilterEffectChooser();
 
     virtual Glib::SignalProxy0<void> signal_selection_changed() = 0;
     virtual SPFilter* get_selected_filter() = 0;