From: Cosimo Cecchi Date: Wed, 30 May 2012 16:55:51 +0000 (-0400) Subject: gtk-demo: don't try to add tabs for empty filenames X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~19800 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=46f967dd7afa6c1c2b1174a562213d64d6b56c5d;p=gtk4.git gtk-demo: don't try to add tabs for empty filenames --- 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])) {