summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2012-04-05 18:11:37 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2012-04-05 18:11:37 +0000
commit5ac6a630720ce6800dea0f253f3895b4ade412fd (patch)
tree18eb100c06965e59cc18a817cb0f895c5f0a1852 /src/file.cpp
parentfix crash (bug #941317) (diff)
downloadinkscape-5ac6a630720ce6800dea0f253f3895b4ade412fd.tar.gz
inkscape-5ac6a630720ce6800dea0f253f3895b4ade412fd.zip
fix crash (bug #973174)
Fixed bugs: - https://launchpad.net/bugs/973174 (bzr r11158)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 88fbc542d..0657f0b10 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -860,10 +860,11 @@ sp_file_save_dialog(Gtk::Window &parentWindow, SPDocument *doc, Inkscape::Extens
g_warning( "Error converting save filename to UTF-8." );
Inkscape::Extension::Output *omod = dynamic_cast<Inkscape::Extension::Output *>(selectionType);
- Glib::ustring save_extension = (std::string)omod->get_extension();
-
- if ( !hasEnding(fileName, save_extension.c_str()) ) {
- fileName += save_extension.c_str();
+ if (omod) {
+ Glib::ustring save_extension = (std::string)omod->get_extension();
+ if ( !hasEnding(fileName, save_extension.c_str()) ) {
+ fileName += save_extension.c_str();
+ }
}
// FIXME: does the argument !is_copy really convey the correct meaning here?