region: GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS can be empty

But non-NULL. Handle that case.
This commit is contained in:
Bastien Nocera 2011-01-21 17:06:44 +00:00
parent 5152655a12
commit 06e04097fd

View file

@ -77,7 +77,8 @@ xkb_layouts_get_selected_list (void)
retval = g_settings_get_strv (xkb_keyboard_settings, retval = g_settings_get_strv (xkb_keyboard_settings,
GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS); GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS);
if (retval == NULL) { if (retval == NULL || retval[0] == NULL) {
g_strfreev (retval);
retval = g_strdupv (initial_config.layouts_variants); retval = g_strdupv (initial_config.layouts_variants);
} }