summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/gtk/file_dlg.c2
-rw-r--r--ui/qt/wireshark_application.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/gtk/file_dlg.c b/ui/gtk/file_dlg.c
index bb3c2a7752..b7ec47adcb 100644
--- a/ui/gtk/file_dlg.c
+++ b/ui/gtk/file_dlg.c
@@ -448,7 +448,7 @@ set_last_open_dir(const char *dirname)
size_t len;
gchar *new_last_open_dir;
- if (dirname) {
+ if (dirname && dirname[0]) {
len = strlen(dirname);
if (dirname[len-1] == G_DIR_SEPARATOR) {
new_last_open_dir = g_strconcat(dirname, NULL);
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index 7615297a8e..51627c24eb 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -395,7 +395,7 @@ void WiresharkApplication::setLastOpenDir(const char *dir_name)
qint64 len;
gchar *new_last_open_dir;
- if (dir_name) {
+ if (dir_name && dir_name[0]) {
len = strlen(dir_name);
if (dir_name[len-1] == G_DIR_SEPARATOR) {
new_last_open_dir = g_strconcat(dir_name, (char *)NULL);