summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9eed188)
raw | patch | inline | side by side (parent: 9eed188)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 20 Sep 2008 23:46:21 +0000 (23:46 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 20 Sep 2008 23:46:21 +0000 (23:46 +0000) |
src/sp-object.cpp | patch | blob | history |
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 83bb7282c44dd5b617192d5c7d3cdbf397365f93..0153fedc2e84d22bddecd9d6bd657c9c8acb199e 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -817,7 +817,8 @@ sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::No
object->document = document;
object->repr = repr;
- Inkscape::GC::anchor(repr);
+ if (!cloned)
+ Inkscape::GC::anchor(repr);
object->cloned = cloned;
if (!SP_OBJECT_IS_CLONED(object)) {
this->_default_label = NULL;
this->document->bindObjectToRepr(this->repr, NULL);
+
+ Inkscape::GC::release(this->repr);
} else {
g_assert(!this->id);
}
this->style = sp_style_unref(this->style);
}
- Inkscape::GC::release(this->repr);
-
this->document = NULL;
this->repr = NULL;
}