forked from enlightenment/efl
Do not try to get the genlist Smart_Data from the data pointer in
show_region_hook, but rather get it from the actual Object. Fixes a crash that happens if someone overrides the show_region_hook (via elm_widget call) and passes an Int or String or something else as the data parameter. Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 82571
This commit is contained in:
parent
44363b8f19
commit
90164ddfdf
|
@ -2528,12 +2528,12 @@ _elm_genlist_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
/* FIXME: take off later. maybe this show region coords belong in the
|
||||
* interface (new api functions, set/get)? */
|
||||
static void
|
||||
_show_region_hook(void *data,
|
||||
_show_region_hook(void *data EINA_UNUSED,
|
||||
Evas_Object *obj)
|
||||
{
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
ELM_GENLIST_DATA_GET(data, sd);
|
||||
ELM_GENLIST_DATA_GET_OR_RETURN(obj, sd);
|
||||
|
||||
elm_widget_show_region_get(obj, &x, &y, &w, &h);
|
||||
//x & y are screen coordinates, Add with pan coordinates
|
||||
|
@ -4624,7 +4624,7 @@ _elm_genlist_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
evas_object_repeat_events_set(priv->hit_rect, EINA_TRUE);
|
||||
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
elm_widget_on_show_region_hook_set(obj, _show_region_hook, obj);
|
||||
elm_widget_on_show_region_hook_set(obj, _show_region_hook, NULL);
|
||||
|
||||
priv->generation = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue