elm gengrid: Fixed crashed on Enter event with no selected item. Patch by

Jeonghyun Yoon <jh0506.yun@samsung.com>

2011/12/23 윤정현 <jh0506.yun@samsung.com>:
> Dear All.
>
> I found a bug in elm_gengrid.c
>
> Gengrid will be crashed if input “Enter” key when selected is null.
>
> I fixed code, please review this small patch.
>
> Thanks.



SVN revision: 66471
This commit is contained in:
Daniel Juyung Seo 2011-12-23 06:52:05 +00:00
parent 83638390fe
commit 5c57fb3438
1 changed files with 4 additions and 3 deletions

View File

@ -325,9 +325,10 @@ _event_hook(Evas_Object *obj,
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
else if ((!strcmp(ev->keyname, "Return")) ||
(!strcmp(ev->keyname, "KP_Enter")) ||
(!strcmp(ev->keyname, "space")))
else if (((!strcmp(ev->keyname, "Return")) ||
(!strcmp(ev->keyname, "KP_Enter")) ||
(!strcmp(ev->keyname, "space")))
&& (!wd->multi) && (wd->selected))
{
it = elm_gengrid_selected_item_get(obj);
evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it);