Merge pull request #103793 from Rindbee/fix-memory-leak-caused-by-hidden-tooltip-controls

Fix memory leak caused by hidden tooltip controls
This commit is contained in:
Thaddeus Crews 2025-03-11 14:00:40 -05:00
commit 41a3098fb5
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -1505,6 +1505,7 @@ void Viewport::_gui_show_tooltip() {
// This way, the custom tooltip from `ConnectionsDockTree` can create
// its own tooltip without conflicting with the default one, even an empty tooltip.
if (base_tooltip && !base_tooltip->is_visible()) {
memdelete(base_tooltip);
return;
}