]> Pileus Git - ~andy/gtk/commitdiff
gtk-demo: don't try to add tabs for empty filenames
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 30 May 2012 16:55:51 +0000 (12:55 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 30 May 2012 17:17:23 +0000 (13:17 -0400)
demos/gtk-demo/main.c

index 95e841e615cd9364fde6241e81f518785fb80f69..2ac72170d10c104979f76f44a9567aa792726c85 100644 (file)
@@ -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]))
     {