mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Fixed a crash in HandleMenuCommand(). It could especially happen on Quit.
This commit is contained in:
parent
8aed081b91
commit
a1f5431951
@ -169,6 +169,9 @@ PRBool nsMacEventHandler::HandleMenuCommand(
|
||||
if (toolkit)
|
||||
focusedWidget = toolkit->GetFocus();
|
||||
|
||||
if (!focusedWidget)
|
||||
return PR_FALSE;
|
||||
|
||||
// nsEvent
|
||||
nsMenuEvent menuEvent;
|
||||
menuEvent.eventStructType = NS_MENU_EVENT;
|
||||
@ -1182,7 +1185,8 @@ PRBool nsMacEventHandler::HandleStartComposition(void)
|
||||
if (toolkit)
|
||||
focusedWidget = toolkit->GetFocus();
|
||||
|
||||
if (!focusedWidget) return PR_FALSE;
|
||||
if (!focusedWidget)
|
||||
return PR_FALSE;
|
||||
|
||||
//
|
||||
// create the nsCompositionEvent
|
||||
@ -1219,7 +1223,8 @@ PRBool nsMacEventHandler::HandleEndComposition(void)
|
||||
if (toolkit)
|
||||
focusedWidget = toolkit->GetFocus();
|
||||
|
||||
if (!focusedWidget) return PR_FALSE;
|
||||
if (!focusedWidget)
|
||||
return PR_FALSE;
|
||||
|
||||
//
|
||||
// create the nsCompositionEvent
|
||||
@ -1256,7 +1261,8 @@ PRBool nsMacEventHandler::HandleTextEvent(void)
|
||||
if (toolkit)
|
||||
focusedWidget = toolkit->GetFocus();
|
||||
|
||||
if (!focusedWidget) return PR_FALSE;
|
||||
if (!focusedWidget)
|
||||
return PR_FALSE;
|
||||
|
||||
//
|
||||
// create the nsCompositionEvent
|
||||
|
Loading…
Reference in New Issue
Block a user