summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2015-10-12 16:46:36 +0900
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commit97b5eb86ce5afd44f9cbceba622640553e446c2e (patch)
treed7e0db1a6677d83995e48ecceb279dfef52464e0
parentd38e01cef77cbfd87497075c864ac805412194e8 (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
-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) &&