From 67c1d16c130ceddd841b6d890c45600bb5ee1da7 Mon Sep 17 00:00:00 2001 From: "marco.zehe@googlemail.com" Date: Sun, 20 Apr 2008 23:24:08 -0700 Subject: [PATCH] bug 429622 - Crash [@ nsRootAccessible::GetState(unsigned int*, unsigned int*) ] r=aaronlev a1.9=beltzner --- accessible/src/base/nsRootAccessible.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accessible/src/base/nsRootAccessible.cpp b/accessible/src/base/nsRootAccessible.cpp index 25137e51701..9a81d9b080e 100644 --- a/accessible/src/base/nsRootAccessible.cpp +++ b/accessible/src/base/nsRootAccessible.cpp @@ -238,10 +238,12 @@ nsRootAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState) if (privateDOMWindow) { nsIFocusController *focusController = privateDOMWindow->GetRootFocusController(); - PRBool isActive = PR_FALSE; - focusController->GetActive(&isActive); - if (isActive) { - *aExtraState |= nsIAccessibleStates::EXT_STATE_ACTIVE; + if (focusController) { + PRBool isActive = PR_FALSE; + focusController->GetActive(&isActive); + if (isActive) { + *aExtraState |= nsIAccessibleStates::EXT_STATE_ACTIVE; + } } } #ifdef MOZ_XUL