diff --git a/accessible/src/xul/XULMenuAccessible.cpp b/accessible/src/xul/XULMenuAccessible.cpp index f2c1eae59b10..0df1ac9e8a95 100644 --- a/accessible/src/xul/XULMenuAccessible.cpp +++ b/accessible/src/xul/XULMenuAccessible.cpp @@ -120,7 +120,7 @@ XULMenuitemAccessible::NativeInteractiveState() const // Note: keep in sinc with nsXULPopupManager::IsValidMenuItem() logic. bool skipNavigatingDisabledMenuItem = true; nsMenuFrame* menuFrame = do_QueryFrame(GetFrame()); - if (!menuFrame->IsOnMenuBar()) { + if (!menuFrame || !menuFrame->IsOnMenuBar()) { skipNavigatingDisabledMenuItem = LookAndFeel:: GetInt(LookAndFeel::eIntID_SkipNavigatingDisabledMenuItem, 0) != 0; }