commit 4f9c7b401e948756fbe76a56a7619052f8acae42 Author: Sergey V. Udaltsov Date: Wed May 5 00:36:04 2010 +0100 Do not crash on kbd plug in There is funny race condition in X - when _XKB_RULES_NAMES is already loaded from sysconfig while actual XKB config is still not changed (from user config). This commit should fix https://bugzilla.gnome.org/show_bug.cgi?id=617643 diff --git a/libgnomekbd/gkbd-indicator.c b/libgnomekbd/gkbd-indicator.c index 5def369..f6064fa 100644 --- a/libgnomekbd/gkbd-indicator.c +++ b/libgnomekbd/gkbd-indicator.c @@ -318,7 +318,7 @@ gkbd_indicator_extract_layout_name (int group, XklEngine * engine, gchar ** short_group_names, gchar ** full_group_names) { - char *layout_name; + char *layout_name = NULL; if (group < g_strv_length (short_group_names)) { if (xkl_engine_get_features (engine) & XKLF_MULTIPLE_LAYOUTS_SUPPORTED) { @@ -352,7 +352,7 @@ gkbd_indicator_extract_layout_name (int group, XklEngine * engine, } if (layout_name == NULL) - layout_name = g_strdup ("??"); + layout_name = g_strdup (""); return layout_name; } diff --git a/libgnomekbd/gkbd-status.c b/libgnomekbd/gkbd-status.c index 90731af..efcad6a 100644 --- a/libgnomekbd/gkbd-status.c +++ b/libgnomekbd/gkbd-status.c @@ -152,6 +152,7 @@ gkbd_status_render_cairo (cairo_t * cr, int group) cairo_font_options_t *fo; static GHashTable *ln2cnt_map = NULL; + xkl_debug (160, "Rendering cairo for group %d\n", group); if (globals.ind_cfg.background_color != NULL && globals.ind_cfg.background_color[0] != 0) { if (sscanf