From f6fcf4ca6f10802cbe20ba7590c445d998666b65 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 3 Jan 2018 22:24:33 +0000 Subject: [PATCH] Fix crash when the mouse-overed support power loses all instances. --- .../Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs index 3efba63b1c..e5de685d5a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/SupportPowerTooltipLogic.cs @@ -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;