e xkbswitch: don't free layouts that are just pointed to in instances
we free the instance layout even though tthis is never duplicated but jhust set to point to the current_layout. don't free it as this causes a double-free. this fixes a crash here. @fix
This commit is contained in:
parent
114a604166
commit
0d9af6c3d6
|
@ -138,10 +138,7 @@ _xkb_update_icon(int cur_group)
|
|||
EINA_LIST_FOREACH(instances, l, inst)
|
||||
{
|
||||
if (!e_config_xkb_layout_eq(e_config->xkb.current_layout, inst->layout))
|
||||
{
|
||||
e_config_xkb_layout_free(inst->layout);
|
||||
inst->layout = e_config->xkb.current_layout;
|
||||
}
|
||||
inst->layout = e_config->xkb.current_layout;
|
||||
E_FREE_FUNC(inst->o_xkbflag, evas_object_del);
|
||||
e_theme_edje_object_set(inst->o_xkbswitch,
|
||||
"base/theme/modules/xkbswitch",
|
||||
|
@ -155,10 +152,7 @@ _xkb_update_icon(int cur_group)
|
|||
EINA_LIST_FOREACH(instances, l, inst)
|
||||
{
|
||||
if (!e_config_xkb_layout_eq(e_config->xkb.current_layout, inst->layout))
|
||||
{
|
||||
e_config_xkb_layout_free(inst->layout);
|
||||
inst->layout = e_config->xkb.current_layout;
|
||||
}
|
||||
inst->layout = e_config->xkb.current_layout;
|
||||
if (!inst->o_xkbflag)
|
||||
inst->o_xkbflag = e_icon_add(inst->gcc->gadcon->evas);
|
||||
e_theme_edje_object_set(inst->o_xkbswitch,
|
||||
|
|
Loading…
Reference in New Issue