mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-10-07 09:33:28 +00:00
sendEvent: can cause the window to be destroyed
This commit is contained in:
parent
08af95f905
commit
8dfbdbf226
@ -2091,6 +2091,10 @@ NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification
|
||||
|
||||
-(void)sendEvent:(NSEvent *)event {
|
||||
|
||||
// Some events can cause our window to be destroyed
|
||||
// So make sure self lives at least through this current run loop...
|
||||
[[self retain] autorelease];
|
||||
|
||||
if (_sheetContext != nil) {
|
||||
NSView *view = [_backgroundView hitTest:[event locationInWindow]];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user