[Xfce4-commits] <xfce4-xkb-plugin:master> Fix to prevent crashing when removing from panel (bug #6122) Thank to Lionel Le Folgoc for proposed patch.

Azamat H. Hackimov noreply at xfce.org
Sat Feb 26 00:04:02 CET 2011


Updating branch refs/heads/master
         to 3f46f407344d4780f5a72b34fa7db23b7b7712ff (commit)
       from 856114644ea975b7c6a68337ce46083c47efa863 (commit)

commit 3f46f407344d4780f5a72b34fa7db23b7b7712ff
Author: Azamat H. Hackimov <azamat.hackimov at gmail.com>
Date:   Sat Feb 19 02:45:05 2011 +0500

    Fix to prevent crashing when removing from panel (bug #6122)
    Thank to Lionel Le Folgoc for proposed patch.

 panel-plugin/xkb-config.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index fbda374..71b6627 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -290,7 +290,7 @@ xkb_config_update_settings (t_xkb_settings *settings)
         if (settings->kbd_config->toggle_option
                 && strlen (settings->kbd_config->toggle_option) > 0)
             options = g_strdup (settings->kbd_config->toggle_option);
-        else options = "";
+        else options = g_strdup ("");
 
         if (settings->kbd_config->compose_key_position
                 && strlen (settings->kbd_config->compose_key_position) > 0)
@@ -312,11 +312,11 @@ xkb_config_update_settings (t_xkb_settings *settings)
     {
         prefix = g_strsplit(*opt, ":", 2);
         if (settings->kbd_config->toggle_option == NULL
-                && prefix && strcmp(*prefix, "grp") == 0)
+                && prefix && *prefix && strcmp(*prefix, "grp") == 0)
         {
             settings->kbd_config->toggle_option = g_strdup (*opt);
         }
-        else if (prefix && strcmp(*prefix, "compose") == 0)
+        else if (prefix && *prefix && strcmp(*prefix, "compose") == 0)
         {
             settings->kbd_config->compose_key_position = g_strdup (*opt);
         }



More information about the Xfce4-commits mailing list