cedric pushed a commit to branch enlightenment-0.17.


commit fea82f6a780456cfc4ee478195c8ba6b500c4fbc
Author: Duna Oh <duna...@samsung.com>
Date:   Fri Jan 9 14:51:40 2015 +0900

    fix crash when activating menu that is not in range
    Summary: add the condition check code if the pressed key is not in range of 
menu items
    Test Plan:
    (1) Left-click on the desktop to bring up the menu.
    (2) Press down the number key to activate the menu item.
    (3) When you press down the number key that is not in range, you will see 
the segmentation error.
    below is the crash log which I encoutered.
    Program received signal SIGSEGV, Segmentation fault.
    _e_menu_item_activate_nth (n=n@entry=5) at src/bin/e_menu.c:2318
    2318       _e_menu_item_ensure_onscreen(mi);
    Reviewers: zmike, gwanglim, raster
    Reviewed By: raster
    Subscribers: cedric
    Differential Revision: https://phab.enlightenment.org/D1845
 src/bin/e_menu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c
index 3b32dde..eea66a4 100644
--- a/src/bin/e_menu.c
+++ b/src/bin/e_menu.c
@@ -2386,6 +2386,7 @@ _e_menu_item_activate_nth(int n)
         if (!mi->separator) i++;
         if (i == n) break;
+   if (!mi) return;
    e_menu_item_active_set(mi, 1);


Reply via email to