diff --git a/src/document.cpp b/src/document.cpp
index 44e13b4f20df8e1ffbe8bc5ffe9da8a54ba4dd1e..3077198cf149a0b327efb470d0998ab1f17c2c7f 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
sp_document_clear_undo(this);
if (root) {
- sp_object_invoke_release(root);
+ root->releaseReferences();
sp_object_unref(root);
root = NULL;
}