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. (cherry picked from commit ac19f2ca68e89f53c33c8553775bf1c402d88206)
This commit is contained in:
@@ -1509,6 +1509,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user