elm_genlist: fix rare segfault

Conditions:
- style is "double_label"
- the is some content for items (i.e elm_label)
- elm_genlist_filter set was once called after genlist creation with
  NULL data
- label_get callback uses elm_genlist_item_prev_get on its current item
- at least one item is added as a sub-item
- ~2 blocks of items are added afterwards
- items are added quickly while holding 'enter' on an elm_button

@fix
This commit is contained in:
Andrii Kroitor 2017-11-17 10:15:21 +02:00
parent 35f3019a6d
commit c37226ef5e
1 changed files with 4 additions and 2 deletions

View File

@ -7691,7 +7691,8 @@ _filter_item_internal(Elm_Gen_Item *it)
WIDGET(it), sd->filter_data)))
{
it->hide = EINA_TRUE;
it->item->block->changed = EINA_TRUE;
if (it->item->block)
it->item->block->changed = EINA_TRUE;
}
else
sd->filtered_count++;
@ -7722,7 +7723,8 @@ _item_filtered_get(Elm_Gen_Item *it)
}
_filter_item_internal(it);
it->item->block->changed = EINA_TRUE;
if (it->item->block)
it->item->block->changed = EINA_TRUE;
ELM_SAFE_FREE(sd->calc_job, ecore_job_del);
sd->calc_job = ecore_job_add(_calc_job, sd->obj);
}