mirror of https://github.com/godotengine/godot
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:
parent
b5bdb88062
commit
ac19f2ca68
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue