diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-10-26 12:33:17 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-10-26 12:33:17 +0000 |
| commit | 7caf32d2b22680c603e4e88c76739c758630412c (patch) | |
| tree | daaf4e77d712bd802076980d7a077dc6562f3df7 /src/sp-object.cpp | |
| parent | Removed BSpline from tell by su_v (diff) | |
| parent | Fix memleak in reference counting introduced in r12532. (diff) | |
| download | inkscape-7caf32d2b22680c603e4e88c76739c758630412c.tar.gz inkscape-7caf32d2b22680c603e4e88c76739c758630412c.zip | |
Update to trunk
(bzr r12588.1.24)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 8c54caf48..e5f119ee0 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -228,7 +228,7 @@ SPObject *sp_object_unref(SPObject *object, SPObject *owner) //g_object_unref(G_OBJECT(object)); object->refCount--; - if (object->refCount < 0) { + if (object->refCount <= 0) { delete object; } @@ -648,11 +648,6 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { try { const std::string typeString = NodeTraits::get_type_string(*rchild); - // special cases - if (typeString.empty()) continue; // comments, usually - if (typeString == "rdf:RDF") continue; // no SP node yet - if (typeString == "inkscape:clipboard") continue; // SP node not necessary - SPObject* child = SPFactory::instance().createObject(typeString); object->attach(child, object->lastChild()); @@ -663,7 +658,7 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { // corresponding classes in the SPObject tree. // (rdf:RDF, inkscape:clipboard, ...) // Thus, simply ignore this case for now. - return; + continue; } } } |
