From 7954d920416dfad98cf7082694f3e8db7c6e17eb Mon Sep 17 00:00:00 2001 From: James Teh Date: Wed, 25 Jan 2012 15:45:14 +1000 Subject: [PATCH] VirtualBuffer.shouldPassThrough: When walking ancestors, correctly handle the case where there are no more parents. This isn't supposed to happen, as it should hit the root NVDAObject before that. Nevertheless, we should handle it gracefully. --- source/virtualBuffers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/virtualBuffers/__init__.py b/source/virtualBuffers/__init__.py index 057919833..bceb30c92 100644 --- a/source/virtualBuffers/__init__.py +++ b/source/virtualBuffers/__init__.py @@ -903,7 +903,7 @@ class VirtualBuffer(cursorManager.CursorManager, treeInterceptorHandler.TreeInte return True if reason == controlTypes.REASON_FOCUS: # If this is a focus change, pass through should be enabled for certain ancestor containers. - while obj != self.rootNVDAObject: + while obj and obj != self.rootNVDAObject: if obj.role == controlTypes.ROLE_TOOLBAR: return True obj = obj.parent -- 2.11.0