Be more careful when parsing gtk-decoration-layout

When the string is empty, breaking it at : will not give
us two tokens, and we were parsing garbage, leading to crash.
https://bugzilla.gnome.org/show_bug.cgi?id=721635
This commit is contained in:
Matthias Clasen 2014-01-06 17:05:53 -05:00
parent feedf46ddc
commit 2602372401

View File

@ -359,7 +359,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
int n_children = 0;
if (tokens[i] == NULL)
continue;
break;
t = g_strsplit (tokens[i], ",", -1);