summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index ccd70f4cb..27c788d75 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -151,6 +151,9 @@ SPObject::~SPObject() {
sp_object_unref(this->_successor, NULL);
this->_successor = NULL;
}
+ if (parent) {
+ parent->children.erase(parent->children.iterator_to(*this));
+ }
if( style == NULL ) {
// style pointer could be NULL if unreffed too many times.