Fix opening a tab crashing MacVim

This seems to be a really old bug but new interactions with macOS
(probably due to macOS 13 Ventura) caused it to surface and crash.
Previously it was assuming a call to removeTrackingRect must always come
only after addTrackingRect was called, which was not a good assumption
to make. As a result, we could call this and end up triggering other
code in macOS when passing in a 0 tracking tag.

Fix #1333
This commit is contained in:
Yee Cheng Chin
2022-11-03 01:55:34 -07:00
parent d311aae873
commit cd4bd98304

View File

@@ -52,7 +52,9 @@
- (void)removeTrackingRect
{
[self removeTrackingRect:_myTrackingRectTag];
if (_myTrackingRectTag != 0)
[self removeTrackingRect:_myTrackingRectTag];
_myTrackingRectTag = 0;
}
// override for rollover effect