diff --git a/accessible/src/base/nsAccessNode.cpp b/accessible/src/base/nsAccessNode.cpp index a1d4463ad35..06414f1cb2a 100755 --- a/accessible/src/base/nsAccessNode.cpp +++ b/accessible/src/base/nsAccessNode.cpp @@ -212,7 +212,11 @@ NS_IMETHODIMP nsAccessNode::GetOwnerWindow(void **aWindow) already_AddRefed nsAccessNode::GetApplicationAccessible() { - if (!gApplicationAccessible && gIsAccessibilityActive) { + if (!gIsAccessibilityActive) { + return nsnull; + } + + if (!gApplicationAccessible) { nsApplicationAccessibleWrap::PreCreate(); gApplicationAccessible = new nsApplicationAccessibleWrap();