Fix GSToolTips leak in NSView

ToolTips can be present even when the flag is false, and it does no harm to invoke removeTipsForView: even if there are none. So this fixes a memory leak without any downside.
This commit is contained in:
williameveretteggplant 2022-02-11 16:15:28 -07:00 committed by GitHub
parent f5ebdcd1d2
commit d744b26429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -750,10 +750,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
TEST_RELEASE(_frameMatrix);
TEST_RELEASE(_boundsMatrix);
TEST_RELEASE(_sub_views);
if (_rFlags.has_tooltips != 0)
{
[GSToolTips removeTipsForView: self];
}
[GSToolTips removeTipsForView: self];
if (_rFlags.has_currects != 0)
{
[self discardCursorRects]; // Handle release of cursors