diff --git a/src/file.cpp b/src/file.cpp
index 0a81069d94f1e193cb8106c26b4a58cdade9d91b..69d6da610383ec34533bebb3554e9cb750a4e546 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
Inkscape::UI::Dialog::SVG_TYPES,
(char const *)_("Select file to open"));
// allow easy access to our examples folder
- dynamic_cast<Gtk::FileChooser *>(openDialogInstance)->add_shortcut_folder(INKSCAPE_EXAMPLESDIR);
+ if (Inkscape::IO::file_test(INKSCAPE_EXAMPLESDIR, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
+ dynamic_cast<Gtk::FileChooser *>(openDialogInstance)->add_shortcut_folder(INKSCAPE_EXAMPLESDIR);
+ }
}
// allow easy access to the user's own templates folder
gchar *templates = profile_path ("templates");
- dynamic_cast<Gtk::FileChooser *>(saveDialog)->add_shortcut_folder(templates);
+ if (Inkscape::IO::file_test(templates, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
+ dynamic_cast<Gtk::FileChooser *>(saveDialog)->add_shortcut_folder(templates);
+ }
g_free (templates);
bool success = saveDialog->show();