forked from enlightenment/enlightenment
xkb core - make layotu set safer by udp before we free
this should fix another possible crash vector. @fix
This commit is contained in:
parent
7c4e58a2fc
commit
855c7028c4
|
@ -435,8 +435,9 @@ e_xkb_layout_set(const E_Config_XKB_Layout *cl)
|
||||||
EINA_SAFETY_ON_NULL_RETURN(cl);
|
EINA_SAFETY_ON_NULL_RETURN(cl);
|
||||||
if (e_config->xkb.dont_touch_my_damn_keyboard) return;
|
if (e_config->xkb.dont_touch_my_damn_keyboard) return;
|
||||||
if (e_config_xkb_layout_eq(e_config->xkb.current_layout, cl)) return;
|
if (e_config_xkb_layout_eq(e_config->xkb.current_layout, cl)) return;
|
||||||
|
cl2 = e_config_xkb_layout_dup(e_config->xkb.current_layout);
|
||||||
e_config_xkb_layout_free(e_config->xkb.current_layout);
|
e_config_xkb_layout_free(e_config->xkb.current_layout);
|
||||||
e_config->xkb.current_layout = e_config_xkb_layout_dup(cl);
|
e_config->xkb.current_layout = cl2;
|
||||||
EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl2)
|
EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl2)
|
||||||
{
|
{
|
||||||
cur_group++;
|
cur_group++;
|
||||||
|
|
Loading…
Reference in New Issue