diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-05-30 12:55:51 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-05-30 13:17:23 -0400 |
commit | 46f967dd7afa6c1c2b1174a562213d64d6b56c5d (patch) | |
tree | 10bedf09c5074d86737fa1e9dd5c657955dafa47 /demos | |
parent | c5629fd06a4187a704b3d0aef016724e9cb388db (diff) | |
download | gtk+-46f967dd7afa6c1c2b1174a562213d64d6b56c5d.tar.gz |
gtk-demo: don't try to add tabs for empty filenames
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index 95e841e615..2ac72170d1 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -573,8 +573,10 @@ load_file (const gchar *filename) names = g_strsplit (filename, " ", -1); - for (i = 1; names[i]; i++) - add_data_tab (names[i]); + for (i = 1; names[i]; i++) { + if (strlen (names[i]) > 0) + add_data_tab (names[i]); + } if (current_file && !strcmp (current_file, names[0])) { |