cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=ee0a65deccaf14da3c058f971ba8f1502baeae75

commit ee0a65deccaf14da3c058f971ba8f1502baeae75
Author: divyesh purohit <div.puro...@samsung.com>
Date:   Fri Feb 5 07:16:13 2016 +0100

    multibuttonentry: fix Segfault on pressing Delete Key
    
    Summary:
    Pressing "Delete" Key in MBE layout causes Segfault as MBE item is not 
deleted properly and also focus is not transferred back to MBE.
    
    @fix
    
    Signed-off-by: divyesh purohit <div.puro...@samsung.com>
    
    Test Plan: Run MultibuttonEntry example from elementart_test . Add some MBE 
items, now press the delete key, it should delete items without causing 
segfaults and transfer focus to previous MBE item.
    
    Reviewers: raster, cedric, CHAN, shilpasingh
    
    Reviewed By: shilpasingh
    
    Subscribers: rajeshps, govi
    
    Differential Revision: https://phab.enlightenment.org/D3635
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elc_multibuttonentry.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 643610e..71aa198 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -1120,6 +1120,7 @@ _layout_key_down_cb(void *data,
              Elm_Multibuttonentry_Item_Data *item = sd->selected_it;
              if (item && sd->editable)
                {
+                  sd->items = eina_list_remove(sd->items, EO_OBJ(item));
                   eo_do(EO_OBJ(item), elm_wdg_item_del());
                   elm_object_focus_set(sd->entry, EINA_TRUE);
                }

-- 


Reply via email to