diff --git a/layout/xul/base/src/nsMenuPopupFrame.cpp b/layout/xul/base/src/nsMenuPopupFrame.cpp index c389502b7b72..38866ebd4789 100644 --- a/layout/xul/base/src/nsMenuPopupFrame.cpp +++ b/layout/xul/base/src/nsMenuPopupFrame.cpp @@ -1375,7 +1375,8 @@ NS_IMETHODIMP nsMenuPopupFrame::SetCurrentMenuItem(nsIMenuFrame* aMenuItem) PRBool isOpen = PR_FALSE; mCurrentMenu->MenuIsOpen(isOpen); mCurrentMenu->SelectMenu(PR_FALSE); - if (isOpen) { + // XXX bug 294183 sometimes mCurrentMenu gets cleared + if (mCurrentMenu && isOpen) { // Don't close up immediately. // Kick off a close timer. KillCloseTimer(); // Ensure we don't have another stray waiting closure.