Must disconnect old UnscopedConnection when setting a new one in operator=, otherwise...
authorCarl Hetherington <carl@carlh.net>
Mon, 21 May 2012 10:26:10 +0000 (10:26 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 21 May 2012 10:26:10 +0000 (10:26 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12356 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/pbd/pbd/signals.h

index e20a126163633a2eef05401e1ea143cc194a3baa..dc53b31f94422047a1865ce8d01626c6a8b8f81a 100644 (file)
@@ -110,6 +110,11 @@ public:
 
        ScopedConnection& operator= (UnscopedConnection const & o)
        {
+               if (_c == o) {
+                       return *this;
+               }
+               
+               disconnect ();
                _c = o;
                return *this;
        }