Fix crash when the mouse-overed support power loses all instances.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
tooltipContainer.BeforeRender = () =>
|
tooltipContainer.BeforeRender = () =>
|
||||||
{
|
{
|
||||||
var icon = palette.TooltipIcon;
|
var icon = palette.TooltipIcon;
|
||||||
if (icon == null)
|
if (icon == null || icon.Power == null || icon.Power.Instances.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var sp = icon.Power;
|
var sp = icon.Power;
|
||||||
|
|||||||
Reference in New Issue
Block a user