1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-07 17:36:07 +00:00

Fix memory leak caused by hidden tooltip controls

Using hidden controls can override the default tooltip behavior, but these
controls are forgotten to be deleted.
This commit is contained in:
风青山
2025-03-08 13:16:41 +08:00
parent b5bdb88062
commit ac19f2ca68

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;
}