fixed a crash in the actor border rendering

This commit is contained in:
Matthias Mailänder
2014-01-16 20:58:18 +01:00
parent ecca689f34
commit d939d5183c

View File

@@ -491,7 +491,7 @@ namespace OpenRA.Editor
if (currentTool == null)
{
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null)
if (x.Key != null && actorTemplates.ContainsKey(x.Value.Type))
DrawActorBorder(e.Graphics, x.Value.Location(), actorTemplates[x.Value.Type]);
}
}