mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 585064 - Crash (null dereference) [@ -[ChildView inactiveWindowAcceptsMouseEvent:]. r=josh,mstange a=blocking2.0
This commit is contained in:
parent
da59314c8d
commit
c04a0c789a
@ -5687,6 +5687,10 @@ static const char* ToEscapedString(NSString* aString, nsCAutoString& aBuf)
|
||||
|
||||
- (BOOL)inactiveWindowAcceptsMouseEvent:(NSEvent*)aEvent
|
||||
{
|
||||
// If we're being destroyed assume the default -- return YES.
|
||||
if (!mGeckoChild)
|
||||
return YES;
|
||||
|
||||
nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_ACTIVATE, nsnull, nsMouseEvent::eReal);
|
||||
[self convertCocoaMouseEvent:aEvent toGeckoEvent:&geckoEvent];
|
||||
return !mGeckoChild->DispatchWindowEvent(geckoEvent);
|
||||
@ -6404,6 +6408,9 @@ ChildViewMouseTracker::ViewForEvent(NSEvent* aEvent)
|
||||
return nil;
|
||||
|
||||
ChildView* childView = (ChildView*)view;
|
||||
// If childView is being destroyed return nil.
|
||||
if (![childView widget])
|
||||
return nil;
|
||||
return WindowAcceptsEvent(window, aEvent, childView) ? childView : nil;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user