elc_multibuttonentry.c: fixed dereference null return value issue which was spotted by coverity. CID 1040023.

elm_widget_item_new() can return NULL on error so it's better to check NULL.
This commit is contained in:
Daniel Juyung Seo 2013-07-06 12:07:51 +09:00
parent 3771cda12d
commit cc9a5b3f06
1 changed files with 2 additions and 0 deletions

View File

@ -709,6 +709,8 @@ _button_item_add(Elm_Multibuttonentry_Smart_Data *sd,
// append item list
item = elm_widget_item_new(obj, Elm_Multibuttonentry_Item);
if (!item) return NULL;
elm_widget_item_del_pre_hook_set(item, _item_del_pre_hook);
elm_widget_item_text_set_hook_set(item, _item_text_set_hook);
elm_widget_item_text_get_hook_set(item, _item_text_get_hook);