summaryrefslogtreecommitdiffstats
path: root/src/ui/view/view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/view/view.cpp')
-rw-r--r--src/ui/view/view.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index 48c48c750..04158ddbd 100644
--- a/src/ui/view/view.cpp
+++ b/src/ui/view/view.cpp
@@ -97,7 +97,6 @@ void View::_close() {
if (_doc) {
_document_uri_set_connection.disconnect();
_document_resized_connection.disconnect();
- sp_document_unref(_doc);
_doc = 0;
}
@@ -139,10 +138,9 @@ void View::setDocument(SPDocument *doc) {
if (_doc) {
_document_uri_set_connection.disconnect();
_document_resized_connection.disconnect();
- sp_document_unref (_doc);
}
- _doc = sp_document_ref (doc);
+ _doc = doc;
_document_uri_set_connection =
_doc->connectURISet(sigc::bind(sigc::ptr_fun(&_onDocumentURISet), this));
_document_resized_connection =