summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2012-10-26 11:39:55 +0000
committerJazzyNico <nicoduf@yahoo.fr>2012-10-26 11:39:55 +0000
commit4b2c5f1410bce434005641ad6849f2d02a920e82 (patch)
tree2287593fe60893b1cd29616ab6b7f7d092790f3c /src/file.cpp
parentTranslations. Translations template update. (diff)
downloadinkscape-4b2c5f1410bce434005641ad6849f2d02a920e82.tar.gz
inkscape-4b2c5f1410bce434005641ad6849f2d02a920e82.zip
Fix for Bug #1070903 (Crash when saving a new document).
(bzr r11828)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp
index a03c459da..cb4ea591c 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -952,7 +952,13 @@ sp_file_save_document(Gtk::Window &parentWindow, SPDocument *doc)
}
}
} else {
- Glib::ustring msg = Glib::ustring::format(_("No changes need to be saved."), " ", doc->getURI());
+ Glib::ustring msg;
+ if ( doc->getURI() == NULL )
+ {
+ msg = Glib::ustring::format(_("No changes need to be saved."));
+ } else {
+ msg = Glib::ustring::format(_("No changes need to be saved."), " ", doc->getURI());
+ }
SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg.c_str());
success = TRUE;
}