[orca/gnome-3-14] Fix traceback seen when presenting a null object
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-14] Fix traceback seen when presenting a null object
- Date: Fri, 28 Nov 2014 00:17:26 +0000 (UTC)
commit 48032078bb3c3211d866f6fb12d3a2f7440fd614
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Nov 27 19:14:56 2014 -0500
Fix traceback seen when presenting a null object
src/orca/scripts/toolkits/Gecko/script.py | 4 ++--
.../toolkits/Gecko/structural_navigation.py | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index e88e6fc..17f53c1 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2577,7 +2577,7 @@ class Script(default.Script):
[obj, characterOffset] = self.getCaretContext()
thisLine = self.getLineContentsAtOffset(obj, characterOffset)
- if not thisLine and thisLine[0]:
+ if not (thisLine and thisLine[0]):
return False
startObj, startOffset = thisLine[0][0], thisLine[0][1]
@@ -2607,7 +2607,7 @@ class Script(default.Script):
[obj, characterOffset] = self.getCaretContext()
thisLine = self.getLineContentsAtOffset(obj, characterOffset)
- if not thisLine and thisLine[0]:
+ if not (thisLine and thisLine[0]):
return False
lastObj, lastOffset = thisLine[-1][0], thisLine[-1][2]
diff --git a/src/orca/scripts/toolkits/Gecko/structural_navigation.py
b/src/orca/scripts/toolkits/Gecko/structural_navigation.py
index ed518c9..7bea027 100644
--- a/src/orca/scripts/toolkits/Gecko/structural_navigation.py
+++ b/src/orca/scripts/toolkits/Gecko/structural_navigation.py
@@ -147,6 +147,9 @@ class GeckoStructuralNavigation(structural_navigation.StructuralNavigation):
def _presentObject(self, obj, offset):
"""Presents the entire object to the user."""
+ if not obj:
+ return
+
if obj.getRole() == pyatspi.ROLE_LINK:
try:
obj.queryComponent().grabFocus()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]