From: johanengelen Date: Sat, 3 Nov 2007 18:02:54 +0000 (+0000) Subject: add destructor to LayerManager that disconnects it signals. see bug: [ 1720871 ]... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0fbedc12e893a841e58861caedee40d06af1fa1d;p=inkscape.git add destructor to LayerManager that disconnects it signals. see bug: [ 1720871 ] Crash when adding a layer --- diff --git a/src/layer-manager.cpp b/src/layer-manager.cpp index 34a909a79..86c8e4fcd 100644 --- a/src/layer-manager.cpp +++ b/src/layer-manager.cpp @@ -74,6 +74,12 @@ LayerManager::LayerManager(SPDesktop *desktop) _setDocument(desktop->doc()); } +LayerManager::~LayerManager() +{ + _layer_connection.disconnect(); + _document_connection.disconnect(); + _resource_connection.disconnect(); +} void LayerManager::setCurrentLayer( SPObject* obj ) { diff --git a/src/layer-manager.h b/src/layer-manager.h index 0dec95c97..514677fd0 100644 --- a/src/layer-manager.h +++ b/src/layer-manager.h @@ -26,6 +26,7 @@ class LayerManager : public DocumentSubset, { public: LayerManager(SPDesktop *desktop); + ~LayerManager(); void setCurrentLayer( SPObject* obj ); void renameLayer( SPObject* obj, gchar const *label );