Fix error when Control state is cleared during scripts reload

This commit is contained in:
Ari Vuollet
2025-04-07 21:10:49 +03:00
parent 9c5c98e8f3
commit 063f3c69ad
+4 -4
View File
@@ -424,7 +424,7 @@ namespace FlaxEngine.GUI
private void OnUpdateTooltip(float deltaTime)
{
Tooltip.OnMouseOverControl(this, deltaTime);
Tooltip?.OnMouseOverControl(this, deltaTime);
}
/// <summary>
@@ -742,7 +742,7 @@ namespace FlaxEngine.GUI
// Update tooltip
if (ShowTooltip && OnTestTooltipOverControl(ref location))
{
Tooltip.OnMouseEnterControl(this);
Tooltip?.OnMouseEnterControl(this);
SetUpdate(ref _tooltipUpdate, OnUpdateTooltip);
}
}
@@ -759,14 +759,14 @@ namespace FlaxEngine.GUI
{
if (_tooltipUpdate == null)
{
Tooltip.OnMouseEnterControl(this);
Tooltip?.OnMouseEnterControl(this);
SetUpdate(ref _tooltipUpdate, OnUpdateTooltip);
}
}
else if (_tooltipUpdate != null)
{
SetUpdate(ref _tooltipUpdate, null);
Tooltip.OnMouseLeaveControl(this);
Tooltip?.OnMouseLeaveControl(this);
}
}