[orca] Don't use invalid indices on empty selection
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't use invalid indices on empty selection
- Date: Tue, 6 Sep 2022 07:27:28 +0000 (UTC)
commit e3b2b86a57911614033bba8a1034233256c116d3
Author: Michael Weghorn <m weghorn posteo de>
Date: Tue Sep 6 08:20:45 2022 +0200
Don't use invalid indices on empty selection
src/orca/script_utilities.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 248270ed7..21e87c8f1 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4174,6 +4174,10 @@ class Utilities:
debug.println(debug.LEVEL_INFO, msg, True)
return None, None
+ msg = "INFO: %s reports %i selected children" % (obj, count)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ if count < 1:
+ return None, None
return selection.getSelectedChild(0), selection.getSelectedChild(count-1)
def focusedChild(self, obj):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]