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:
Carsten Haitzler 2016-03-08 13:45:59 +09:00
parent 114a604166
commit 0d9af6c3d6
1 changed files with 2 additions and 8 deletions

View File

@ -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,