diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index fd368dd613a0164915c70f0797dec0bb09f10f08..5f6bf779fabc2d90c011ce32469ee5ddf736a517 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
g_return_if_fail(SP_IS_OBJECT(object));
g_return_if_fail(object->parent == parent);
+ sp_object_invoke_release(object);
+
SPObject *prev=NULL;
for ( SPObject *child = parent->children ; child && child != object ;
child = child->next )
object->next = NULL;
object->parent = NULL;
- sp_object_invoke_release(object);
parent->_updateTotalHRefCount(-object->_total_hrefcount);
sp_object_unref(object, parent);
}
g_assert(object != NULL);
g_assert(SP_IS_OBJECT(object));
- // we need to remember our parent
- // g_assert(!object->parent);
- g_assert(!object->next);
g_assert(object->document);
g_assert(object->repr);