discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=3f82a7f1fb5cf7e1a33da1bdb6dec22b1417eb2a

commit 3f82a7f1fb5cf7e1a33da1bdb6dec22b1417eb2a
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Feb 17 12:33:53 2016 -0500

    return no binding found when trying to incrementally resolve end-of-list 
mousebinds
    
    in the case where every binding until the end of the binding list has been 
rejected,
    returning NULL must happen in order to inform callers that there is no more 
resolving
    to be done, breaking out of an otherwise infinite resolve loop
    
    ref fe5d2e6e61747e27292339b01c8b5f9193ecad62
---
 src/bin/e_bindings.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c
index e75b00d..37c6093 100644
--- a/src/bin/e_bindings.c
+++ b/src/bin/e_bindings.c
@@ -428,7 +428,15 @@ e_bindings_mouse_button_find(E_Binding_Context ctxt, 
E_Binding_Event_Mouse_Butto
 
    if (bind_ret && *bind_ret)
      start = eina_list_data_find_list(mouse_bindings, *bind_ret);
-   if (start) start = start->next;
+   if (start)
+     {
+        start = start->next;
+        if (!start)
+          {
+             *bind_ret = NULL;
+             return NULL;
+          }
+     }
    EINA_LIST_FOREACH(start ?: mouse_bindings, l, binding)
      {
         if ((binding->button == (int)ev->button) &&
@@ -1187,7 +1195,15 @@ e_bindings_wheel_find(E_Binding_Context ctxt, 
E_Binding_Event_Wheel *ev, E_Bindi
 
    if (bind_ret && *bind_ret)
      start = eina_list_data_find_list(wheel_bindings, *bind_ret);
-   if (start) start = start->next;
+   if (start)
+     {
+        start = start->next;
+        if (!start)
+          {
+             *bind_ret = NULL;
+             return NULL;
+          }
+     }
    EINA_LIST_FOREACH(start ?: wheel_bindings, l, binding)
      {
         if ((binding->direction == ev->direction) &&

-- 


Reply via email to