mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Null check on focused widget to avoid crash.
This commit is contained in:
parent
7cb68edb39
commit
63a20023ad
@ -384,6 +384,8 @@ PRBool nsMacEventHandler::HandleKeyEvent(EventRecord& aOSEvent)
|
||||
if (toolkit)
|
||||
focusedWidget = toolkit->GetFocus();
|
||||
|
||||
if (!focusedWidget) return PR_FALSE;
|
||||
|
||||
// nsEvent
|
||||
nsKeyEvent keyEvent;
|
||||
keyEvent.eventStructType = NS_KEY_EVENT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user