Skip to content

Commit

Permalink
Retaining _original_nextKeyView to prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
williameveretteggplant committed May 3, 2024
1 parent 192c121 commit 64e52dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/NSTabView.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ - (id) initWithFrame: (NSRect)rect
ASSIGN(_items, [NSMutableArray array]);
ASSIGN(_font, [NSFont systemFontOfSize: 0]);
_selected = nil;
_original_nextKeyView = nil;
//_truncated_label = NO;
}

Expand Down Expand Up @@ -738,7 +739,8 @@ - (void) _setUpKeyViewLoopWithNextKeyView: (NSView *)nextKeyView

- (void) setNextKeyView: (NSView *)nextKeyView
{
_original_nextKeyView = nextKeyView;
[_original_nextKeyView autorelease];
_original_nextKeyView = [nextKeyView retain];
if (_selected)
{
[[_selected _lastKeyView] setNextKeyView: nextKeyView];
Expand Down

0 comments on commit 64e52dd

Please sign in to comment.