[gtk/a11y-action-fixes: 1/2] atspi: Fix a thinko in action filtering




commit 3eae91255d2ed9a856ac8ddfa82e68b737b7f1f9
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 15 21:28:11 2020 -0400

    atspi: Fix a thinko in action filtering
    
    get_action_at_index() was trying hard to find out
    which actions are valid, only to then return the
    invalid ones anyway.

 gtk/a11y/gtkatspiaction.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtkatspiaction.c b/gtk/a11y/gtkatspiaction.c
index c33361e7cc..bcb74d594a 100644
--- a/gtk/a11y/gtkatspiaction.c
+++ b/gtk/a11y/gtkatspiaction.c
@@ -639,12 +639,12 @@ get_action_at_index (GtkActionMuxer  *muxer,
         continue;
 
       if (real_pos == pos)
-        break;
+        return actions[i];
 
       real_pos += 1;
     }
 
-  return actions[real_pos];
+  return NULL;
 }
 
 static int


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]