aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 8bbfc43c1..7e90f4065 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -1013,12 +1013,15 @@ impl_show_file_picker (EphyEmbedSingle *shell,
FileFormat *file_formats,
int *ret_file_format)
{
- gchar *expanded_directory;
+ char *expanded_directory = NULL;
gresult result;
GFilePicker *filePicker = new GFilePicker (file_formats);
- expanded_directory = gnome_vfs_expand_initial_tilde (directory);
+ if (directory != NULL)
+ {
+ expanded_directory = gnome_vfs_expand_initial_tilde (directory);
+ }
/* make sure the directory exists, and use the home directory
* otherwise */