summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 41defcc01..4a3d40308 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -1475,9 +1475,10 @@ void SPDocument::setModifiedSinceSave(bool modified) {
this->modified_since_save = modified;
if (SP_ACTIVE_DESKTOP) {
Gtk::Window *parent = SP_ACTIVE_DESKTOP->getToplevel();
- g_assert(parent != NULL);
- SPDesktopWidget *dtw = static_cast<SPDesktopWidget *>(parent->get_data("desktopwidget"));
- dtw->updateTitle( this->getName() );
+ if (parent) { // during load, SP_ACTIVE_DESKTOP may be !nullptr, but parent might still be nullptr
+ SPDesktopWidget *dtw = static_cast<SPDesktopWidget *>(parent->get_data("desktopwidget"));
+ dtw->updateTitle( this->getName() );
+ }
}
}