mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Ensure ‘self’ is kept retained
This shouldn’t be necessary, as we have a ‘retainedSelf’ instance variable that isn’t cleared until ‘[self.window close]’ (the last line of the accept: method), nonetheless I am seeing (rare) crashes from this method, and it appears to be reading the ‘self.window’ property in the last line, so adding this extra safety and will monitor crash reports.
This commit is contained in:
@@ -238,9 +238,10 @@
|
||||
|
||||
- (IBAction)accept:(id)sender
|
||||
{
|
||||
[[self window] orderOut:self];
|
||||
[self sendAction:nil];
|
||||
[[self window] close];
|
||||
OakFilterWindowController* retainedSelf = self;
|
||||
[retainedSelf.window orderOut:self];
|
||||
[retainedSelf sendAction:nil];
|
||||
[retainedSelf.window close];
|
||||
}
|
||||
|
||||
- (IBAction)singleClick:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user