Skip to content

Commit

Permalink
Merge pull request #1361 from ychin/fix-tab-remaining-tracking-tag-crash
Browse files Browse the repository at this point in the history
Fix remaining tab crash from not clearing tracking tags correctly
  • Loading branch information
ychin committed Feb 7, 2023
2 parents b2dacc5 + 3906462 commit 76b9df2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m
Expand Up @@ -476,9 +476,11 @@ - (void)removeTabForCell:(PSMTabBarCell *)cell
[[NSNotificationCenter defaultCenter] removeObserver:cell];
if([cell closeButtonTrackingTag] != 0){
[self removeTrackingRect:[cell closeButtonTrackingTag]];
[cell setCloseButtonTrackingTag:0];
}
if([cell cellTrackingTag] != 0){
[self removeTrackingRect:[cell cellTrackingTag]];
[cell setCellTrackingTag:0];
}

// pull from collection
Expand Down Expand Up @@ -665,9 +667,11 @@ - (void)update
[[NSNotificationCenter defaultCenter] removeObserver:cell];
if([cell closeButtonTrackingTag] != 0){
[self removeTrackingRect:[cell closeButtonTrackingTag]];
[cell setCloseButtonTrackingTag:0];
}
if([cell cellTrackingTag] != 0){
[self removeTrackingRect:[cell cellTrackingTag]];
[cell setCellTrackingTag:0];
}
}

Expand Down

0 comments on commit 76b9df2

Please sign in to comment.