diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-01-06 18:31:47 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-01-06 18:31:47 +0000 |
| commit | 222f1936586214bc889b7c079757cea005980657 (patch) | |
| tree | 7be9ef5572e633af419d45268155bfc407a599f7 /src/file.cpp | |
| parent | Merge branch 'patch-1' of gitlab.com:tobiczech/inkscape (diff) | |
| download | inkscape-222f1936586214bc889b7c079757cea005980657.tar.gz inkscape-222f1936586214bc889b7c079757cea005980657.zip | |
Remove unneeded unreferencing. Add check on reference count.
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/file.cpp b/src/file.cpp index 9e57c0658..255ed467b 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -146,8 +146,6 @@ SPDesktop *sp_file_new(const std::string &templ) sp_create_window(dtw, TRUE); SPDesktop* desktop = static_cast<SPDesktop *>(dtw->view); - doc->doUnref(); - sp_namedview_window_from_document(desktop); sp_namedview_update_layers_from_document(desktop); @@ -230,12 +228,12 @@ bool sp_file_open(const Glib::ustring &uri, doc = nullptr; cancelled = true; } + if (desktop) { desktop->clearWaitingCursor(); } if (doc) { - SPDocument *existing = desktop ? desktop->getDocument() : nullptr; if (existing && existing->virgin && replace_empty) { @@ -252,9 +250,6 @@ bool sp_file_open(const Glib::ustring &uri, doc->virgin = FALSE; - // everyone who cares now has a reference, get rid of our`s - doc->doUnref(); - SPRoot *root = doc->getRoot(); // This is the only place original values should be set. @@ -1299,7 +1294,6 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, } } - doc->doUnref(); DocumentUndo::done(in_doc, SP_VERB_FILE_IMPORT, _("Import")); return new_obj; |
