mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fixed a crash on "File | Print Setup" (or any other dialog without specific menubar) #3769. Approved: chofmann.
This commit is contained in:
parent
7b558a135d
commit
e23982f42f
@ -308,7 +308,7 @@ PRBool nsMacEventHandler::HandleActivateEvent(EventRecord& aOSEvent)
|
||||
nsWindow* focusedWidget = mTopLevelWidget;
|
||||
toolkit->SetFocus(focusedWidget);
|
||||
nsIMenuBar* menuBar = focusedWidget->GetMenuBar();
|
||||
if(menuBar)
|
||||
if (menuBar)
|
||||
{
|
||||
void* menuHandle = nsnull;
|
||||
|
||||
@ -330,10 +330,12 @@ PRBool nsMacEventHandler::HandleActivateEvent(EventRecord& aOSEvent)
|
||||
//¥TODO: save the focused widget for that window
|
||||
toolkit->SetFocus(nsnull);
|
||||
|
||||
Handle menuBar = ::GetMenuBar(); // Get a copy of the menu list
|
||||
|
||||
nsIMenuBar* menuBarInterface = mTopLevelWidget->GetMenuBar();
|
||||
menuBarInterface->SetNativeData((void*)menuBar);
|
||||
if (menuBarInterface)
|
||||
{
|
||||
Handle menuBar = ::GetMenuBar(); // Get a copy of the menu list
|
||||
menuBarInterface->SetNativeData((void*)menuBar);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PR_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user