summaryrefslogtreecommitdiffstats
path: root/src/xml/helper-observer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/helper-observer.cpp')
-rw-r--r--src/xml/helper-observer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xml/helper-observer.cpp b/src/xml/helper-observer.cpp
index e56ddc6f8..957f3df0a 100644
--- a/src/xml/helper-observer.cpp
+++ b/src/xml/helper-observer.cpp
@@ -8,6 +8,11 @@ SignalObserver::SignalObserver()
: _oldsel(NULL)
{}
+SignalObserver::~SignalObserver()
+{
+ set(NULL); // if _oldsel!=nullptr, remove observer and decrease refcount
+}
+
// Add this observer to the SPObject and remove it from any previous object
void SignalObserver::set(SPObject* o)
{