summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-05-21 10:26:10 +0000
committerCarl Hetherington <carl@carlh.net>2012-05-21 10:26:10 +0000
commit23a615a6dbf84a47ca3dbdb2b1f4a382cf6c0820 (patch)
tree20f1bd3edb13ebe794a81b85d523ce4227c0a5f7 /libs
parent0e5dfc2dea7e55a97510a741fc9ff8f107a25cc7 (diff)
Must disconnect old UnscopedConnection when setting a new one in operator=, otherwise the old one is leaked.
git-svn-id: svn://localhost/ardour2/branches/3.0@12356 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/pbd/pbd/signals.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h
index e20a126163..dc53b31f94 100644
--- a/libs/pbd/pbd/signals.h
+++ b/libs/pbd/pbd/signals.h
@@ -110,6 +110,11 @@ public:
ScopedConnection& operator= (UnscopedConnection const & o)
{
+ if (_c == o) {
+ return *this;
+ }
+
+ disconnect ();
_c = o;
return *this;
}