Fix memory leak of tool tips

Prevents the creation of tool tips where they don't already exist. Tool tips only need to be removed in the rect if there are tool tips.
This commit is contained in:
williameveretteggplant 2022-02-14 14:03:49 -07:00 committed by GitHub
parent 3190ce4363
commit 2403c21978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4040,7 +4040,10 @@ Figure out how the additional layout stuff is supposed to work.
}
// Remove any existing tooltips in the redrawn rectangle.
[[GSToolTips tipsForView: self] removeToolTipsInRect: rect];
if (_rFlags.has_tooltips != 0)
{
[[GSToolTips tipsForView: self] removeToolTipsInRect: rect];
}
{
NSRange r;
NSUInteger i = drawnRange.location;