diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2019-04-14 16:06:39 +0200 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2019-04-14 16:06:39 +0200 |
commit | 5ece9b89905cfa65023f00b8e185fbf438c076f8 (patch) | |
tree | 1300bcf61f379062b8bca065863aa90163d53845 /settings-dialogs | |
parent | f5da3d6622c22246ac367bd80fc24ea08c9baa2e (diff) | |
download | xfwm4-5ece9b89905cfa65023f00b8e185fbf438c076f8.tar.gz |
settings: Avoid crashing on broken values
If, for some reason, the xfconf database is broken and the actual button
layout is not available, xfwm4-settings would crash.
Check the settings value to avoid the crash.
Diffstat (limited to 'settings-dialogs')
-rw-r--r-- | settings-dialogs/xfwm4-settings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c index 046bc8626..0377a8b94 100644 --- a/settings-dialogs/xfwm4-settings.c +++ b/settings-dialogs/xfwm4-settings.c @@ -1404,7 +1404,7 @@ xfwm_settings_button_layout_property_changed (XfconfChannel *channel, gtk_container_get_children (GTK_CONTAINER (hidden_box))); /* Move buttons to the active list */ - for (str_value = g_value_get_string (value); *str_value != '\0'; ++str_value) + for (str_value = g_value_get_string (value); str_value != NULL && *str_value != '\0'; ++str_value) for (iter = children; iter != NULL; iter = g_list_next (iter)) { button = GTK_WIDGET (iter->data); |