Fixed unnecessary crash if RallyPoint palette is not used.

This commit is contained in:
Andre Mohren
2018-08-16 19:49:04 +02:00
committed by reaperrr
parent 4a5525d1af
commit 8c5caaf154

View File

@@ -97,11 +97,13 @@ namespace OpenRA.Mods.Common.Effects
IEnumerable<IRenderable> RenderInner(WorldRenderer wr)
{
var palette = wr.Palette(rp.PaletteName);
if (Game.Settings.Game.DrawTargetLine)
yield return new TargetLineRenderable(targetLine, building.Owner.Color.RGB);
if (circles != null || flag != null)
{
var palette = wr.Palette(rp.PaletteName);
if (circles != null)
foreach (var r in circles.Render(targetLine[1], palette))
yield return r;
@@ -111,4 +113,5 @@ namespace OpenRA.Mods.Common.Effects
yield return r;
}
}
}
}