From dcbd627f07e4535ce29b51cbed243ff79f7dec3c Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Fri, 28 Jul 2000 04:10:12 +0000 Subject: [PATCH] Fix for 46749, regression from my earlier checkin. forgot to check for null before looking for the menu parent. Doh! --- layout/xul/base/src/nsMenuFrame.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layout/xul/base/src/nsMenuFrame.cpp b/layout/xul/base/src/nsMenuFrame.cpp index 326e3098b012..2fe3d5d64bd2 100644 --- a/layout/xul/base/src/nsMenuFrame.cpp +++ b/layout/xul/base/src/nsMenuFrame.cpp @@ -585,9 +585,11 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag) if (menuPopup) { // inherit whether or not we're a context menu from the parent - PRBool parentIsContextMenu = PR_FALSE; - mMenuParent->GetIsContextMenu(parentIsContextMenu); - menuPopup->SetIsContextMenu(parentIsContextMenu); + if ( mMenuParent ) { + PRBool parentIsContextMenu = PR_FALSE; + mMenuParent->GetIsContextMenu(parentIsContextMenu); + menuPopup->SetIsContextMenu(parentIsContextMenu); + } // Install a keyboard navigation listener if we're the root of the menu chain. PRBool onMenuBar = PR_TRUE;