Don't try to remove tooltips that haven't been added.
This commit is contained in:
@@ -55,9 +55,9 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
|
|
||||||
public override void MouseExited()
|
public override void MouseExited()
|
||||||
{
|
{
|
||||||
if (TooltipContainer == null)
|
// Only try to remove the tooltip if we know it has been created
|
||||||
return;
|
// This avoids a crash if the widget (and the container it refers to) are being removed
|
||||||
|
if (TooltipContainer != null && tooltipContainer.IsValueCreated)
|
||||||
tooltipContainer.Value.RemoveTooltip();
|
tooltipContainer.Value.RemoveTooltip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user