orca r3504 - in trunk: . src/orca



Author: joanied
Date: Sun Jan 27 00:21:23 2008
New Revision: 3504
URL: http://svn.gnome.org/viewvc/orca?rev=3504&view=rev

Log:
* src/orca/Gecko.py:
   Fix for bug #512270 - orca crash on visiting www.gmail.com 
   after login.



Modified:
   trunk/ChangeLog
   trunk/src/orca/Gecko.py

Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py	(original)
+++ trunk/src/orca/Gecko.py	Sun Jan 27 00:21:23 2008
@@ -6738,6 +6738,11 @@
         if not obj or not self.inDocumentContent(obj):
             return [None, -1]
 
+        if obj.getRole() == pyatspi.ROLE_INVALID:
+            debug.println(debug.LEVEL_SEVERE, \
+                          "findNextCaretInOrder: object is invalid")
+            return [None, -1]
+
         # We do not want to descend objects of certain role types.
         #
         doNotDescend = obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
@@ -6757,7 +6762,7 @@
                 unicodeText = unicodeText[0:len(unicodeText) - 1]
 
             nextOffset = startOffset + 1
-            while nextOffset < len(unicodeText):
+            while 0 <= nextOffset < len(unicodeText):
                 if unicodeText[nextOffset] != self.EMBEDDED_OBJECT_CHARACTER:
                     return [obj, nextOffset]
                 elif obj.childCount:
@@ -6840,6 +6845,11 @@
         if not obj or not self.inDocumentContent(obj):
             return [None, -1]
 
+        if obj.getRole() == pyatspi.ROLE_INVALID:
+            debug.println(debug.LEVEL_SEVERE, \
+                          "findPreviousCaretInOrder: object is invalid")
+            return [None, -1]
+
         # We do not want to descend objects of certain role types.
         #
         doNotDescend = obj.getState().contains(pyatspi.STATE_FOCUSABLE) \



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