Fix crash when the mouse-overed support power loses all instances.

This commit is contained in:
Paul Chote
2018-01-03 22:24:33 +00:00
committed by reaperrr
parent a021bd4584
commit f6fcf4ca6f

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
tooltipContainer.BeforeRender = () =>
{
var icon = palette.TooltipIcon;
if (icon == null)
if (icon == null || icon.Power == null || icon.Power.Instances.Count == 0)
return;
var sp = icon.Power;