From e7423aec32440b35613538215bc3318ac44916c9 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 12 Feb 2006 06:23:23 +0000 Subject: [PATCH] do not try to remove resource if the object is cloned --- src/document.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/document.cpp b/src/document.cpp index f69c480f7..e5c0cd824 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -986,6 +986,9 @@ sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *ob g_return_val_if_fail(object != NULL, FALSE); g_return_val_if_fail(SP_IS_OBJECT(object), FALSE); + if (SP_OBJECT_IS_CLONED(object)) + return FALSE; + rlist = (GSList*)g_hash_table_lookup(document->priv->resources, key); g_return_val_if_fail(rlist != NULL, FALSE); g_return_val_if_fail(g_slist_find(rlist, object), FALSE); -- 2.30.2