diff options
author | Sergey V. Udaltsov <svu@src.gnome.org> | 2006-10-28 20:50:52 +0000 |
---|---|---|
committer | Sergey V. Udaltsov <svu@src.gnome.org> | 2006-10-28 20:50:52 +0000 |
commit | d77943d39747484678c697016c25b779430ac6aa (patch) | |
tree | 24593d888b4aa10bf64eaa845e6a558d50eaaa62 /libgnomekbd/gkbd-indicator.c | |
parent | 10ae0578f7d8ed40d6626af7012b753743b345cf (diff) | |
download | libgnomekbd-d77943d39747484678c697016c25b779430ac6aa.tar.gz |
fixed possible crashes on systems with DBUS connection problems
Diffstat (limited to 'libgnomekbd/gkbd-indicator.c')
-rw-r--r-- | libgnomekbd/gkbd-indicator.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libgnomekbd/gkbd-indicator.c b/libgnomekbd/gkbd-indicator.c index cb0c2e4..37ee5c3 100644 --- a/libgnomekbd/gkbd-indicator.c +++ b/libgnomekbd/gkbd-indicator.c @@ -420,18 +420,24 @@ gkbd_indicator_load_group_names (const gchar ** layout_ids, xkl_engine_get_num_groups (globals.engine); globals.full_group_names = g_new0 (char *, total_groups + 1); + globals.short_group_names = + g_new0 (char *, total_groups + 1); if (xkl_engine_get_features (globals.engine) & XKLF_MULTIPLE_LAYOUTS_SUPPORTED) { GSList *lst = globals.kbd_cfg.layouts_variants; - for (i = 0; lst; lst = lst->next) { - globals.full_group_names[i++] = + for (i = 0; lst; lst = lst->next,i++) { + globals.full_group_names[i] = + g_strdup ((char *) lst->data); + globals.short_group_names[i] = g_strdup ((char *) lst->data); } } else { for (i = total_groups; --i >= 0;) { globals.full_group_names[i] = g_strdup_printf ("Group %d", i); + globals.short_group_names[i] = + g_strdup (globals.full_group_names[i]); } } } |