[Xfce4-commits] [xfce/xfwm4] 04/05: settings: Avoid crashing on broken values

noreply at xfce.org noreply at xfce.org
Sun Apr 14 21:04:14 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit 5ece9b89905cfa65023f00b8e185fbf438c076f8
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sun Apr 14 16:06:39 2019 +0200

    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.
---
 settings-dialogs/xfwm4-settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c
index 046bc86..0377a8b 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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list