OSDN Git Service

Fix possible exception.
authorJames Teh <jamie@jantrid.net>
Wed, 5 Sep 2012 08:35:52 +0000 (18:35 +1000)
committerJames Teh <jamie@jantrid.net>
Wed, 5 Sep 2012 08:35:52 +0000 (18:35 +1000)
source/NVDAObjects/IAccessible/mozilla.py

index 14a4287..974efa7 100755 (executable)
@@ -227,7 +227,7 @@ def findExtraOverlayClasses(obj, clsList):
                # Check if the tree view is a table.\r
                parent = obj.parent\r
                # Tree view items may be nested, so skip any tree view item ancestors.\r
-               while parent and parent.IAccessibleRole == oleacc.ROLE_SYSTEM_OUTLINEITEM:\r
+               while parent and isinstance(parent, Mozilla) and parent.IAccessibleRole == oleacc.ROLE_SYSTEM_OUTLINEITEM:\r
                        newParent = parent.parent\r
                        parent.parent = newParent\r
                        parent = newParent\r