summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2015-10-12 16:46:36 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2015-10-12 16:53:51 +0900
commit5c889512ceb084d24566e82979df7dbdaa74e5bf (patch)
treed7e0db1a6677d83995e48ecceb279dfef52464e0 /src/lib/elm_toolbar.c
parent1094fb77a0ee23cbe1e8b15783e406a8d93b7fd4 (diff)
toolbar: Fix crash on more_item when shrink mode is set with no item.
Toolbar creates a more_item when shrink mode is ELM_TOOLBAR_SHRINK_EXPAND. If select mode is ELM_OBJECT_SELECT_MODE_ALWAYS and there is no item appended, then toolbar sets a selection on a newly created item. In this case, sd->more_item is referenced before the new more_item is assigned to sd->more_item. @fix
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index aa3948183..df2ab9043 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -1077,6 +1077,8 @@ _item_select(Elm_Toolbar_Item_Data *it)
1077 1077
1078 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()) || (it->separator) || (it->object)) 1078 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()) || (it->separator) || (it->object))
1079 return; 1079 return;
1080 if ((sd->shrink_mode == ELM_TOOLBAR_SHRINK_EXPAND) && (!sd->more_item))
1081 return;
1080 sel = it->selected; 1082 sel = it->selected;
1081 1083
1082 if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_NONE) && 1084 if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_NONE) &&