Code

We were disconnecting the wrong signal, resulting on the old object's
authormental <mental@users.sourceforge.net>
Wed, 16 Aug 2006 01:02:09 +0000 (01:02 +0000)
committermental <mental@users.sourceforge.net>
Wed, 16 Aug 2006 01:02:09 +0000 (01:02 +0000)
release signal lingering after a URIReference's referrent changed.  Fixed,
thereby fixing bug #1535218.

src/uri-references.cpp

index 793e10d98ad0ec280e02a093c746107211655c0d..6b2a8401fdeb9d78799af866b5423fbad5e6ed5e 100644 (file)
@@ -97,13 +97,13 @@ void URIReference::_setObject(SPObject *obj) {
        SPObject *old_obj=_obj;
        _obj = obj;
 
+       _release_connection.disconnect();
        if (_obj) {
                sp_object_href(_obj, _owner);
                _release_connection = _obj->connectRelease(sigc::mem_fun(*this, &URIReference::_release));
        }
        _changed_signal.emit(old_obj, _obj);
        if (old_obj) {
-               _release_connection.disconnect();
                /* release the old object _after_ the signal emission */
                sp_object_hunref(old_obj, _owner);
        }