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:
@ -1505,6 +1505,7 @@ void Viewport::_gui_show_tooltip() {
|
|||||||
// This way, the custom tooltip from `ConnectionsDockTree` can create
|
// This way, the custom tooltip from `ConnectionsDockTree` can create
|
||||||
// its own tooltip without conflicting with the default one, even an empty tooltip.
|
// its own tooltip without conflicting with the default one, even an empty tooltip.
|
||||||
if (base_tooltip && !base_tooltip->is_visible()) {
|
if (base_tooltip && !base_tooltip->is_visible()) {
|
||||||
|
memdelete(base_tooltip);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user