diff options
author | Sergey V. Udaltsov <svu@gnome.org> | 2010-05-05 00:36:04 +0100 |
---|---|---|
committer | Sergey V. Udaltsov <svu@gnome.org> | 2010-05-05 22:59:51 +0100 |
commit | 4f9c7b401e948756fbe76a56a7619052f8acae42 (patch) | |
tree | f0bcf6d787dcfc4527cd25059a725ce092a0d1b8 | |
parent | a042921bf75ad6dc07de601f9c7e41353f4fa542 (diff) | |
download | libgnomekbd-4f9c7b401e948756fbe76a56a7619052f8acae42.tar.gz |
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
-rw-r--r-- | libgnomekbd/gkbd-indicator.c | 4 | ||||
-rw-r--r-- | libgnomekbd/gkbd-status.c | 1 |
2 files changed, 3 insertions, 2 deletions
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 |