elm_widget: fix segfaults for _elm_widget_item_style_set/get

Summary:
Changing of styles for widget items isn't realized yet. This fix should
be presented to avoid segfaults when elm_object_item_style_set/get is calling
@fix

Reviewers: seoz, raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: bluezery

Differential Revision: https://phab.enlightenment.org/D1595
This commit is contained in:
artem.popov 2014-10-31 15:24:43 +09:00 committed by ChunEon Park
parent e253be4521
commit 341160133b
1 changed files with 2 additions and 2 deletions

View File

@ -4426,14 +4426,14 @@ _elm_widget_item_style_set(Elm_Widget_Item *item, const char *style)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
ELM_WIDGET_ITEM_RETURN_IF_ONDEL(item);
item->style_set_func(item, style);
if (item->style_set_func) item->style_set_func(item, style);
}
EAPI const char *
_elm_widget_item_style_get(Elm_Widget_Item *item)
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
return item->style_get_func(item);
return item->style_get_func ? item->style_get_func(item) : NULL;
}
EAPI void