Fix editor crash when modifying newly placed actor ID.

This commit is contained in:
Paul Chote
2019-02-20 17:45:09 +00:00
committed by reaperrr
parent 6841da286c
commit 72c90d84a8
2 changed files with 6 additions and 4 deletions

View File

@@ -283,5 +283,10 @@ namespace OpenRA.Mods.Common.Traits
foreach (var preview in previewsForCell.Value)
destinationBuffer.Add(Pair.New(previewsForCell.Key, preview.Owner.Color.RGB));
}
public EditorActorPreview this[string id]
{
get { return previews.FirstOrDefault(p => p.ID.ToLowerInvariant() == id); }
}
}
}