[gnome-control-center] region: Don't crash if the user disabled IS switch keybindings



commit 017fbbc0e62bc4ac0890ec7cee5d8ef71fd9e57d
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon May 13 15:32:18 2013 +0200

    region: Don't crash if the user disabled IS switch keybindings
    
    A 0 length string for a keybinding means it is disabled so the whole
    adding <Shift> magic to the backward accelerator string is pointless
    anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700176

 panels/region/cc-input-options.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/region/cc-input-options.c b/panels/region/cc-input-options.c
index c3873d0..9e4165b 100644
--- a/panels/region/cc-input-options.c
+++ b/panels/region/cc-input-options.c
@@ -89,7 +89,7 @@ update_shortcuts (GtkWidget *options)
         next = g_settings_get_strv (settings, "switch-input-source");
 
         previous_shortcut = g_strdup (previous[0]);
-        if (!previous_shortcut && next[0])
+        if (!previous_shortcut && next[0] && *next[0])
                 previous_shortcut = g_strconcat ("<Shift>", next[0], NULL);
 
         update_shortcut_label (priv->previous_source, previous_shortcut);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]