don't throw as we are checking for null later

This commit is contained in:
Matthias Mailänder
2015-09-12 10:27:22 +02:00
parent 4108b6da46
commit f903cfea96

View File

@@ -187,7 +187,7 @@ namespace OpenRA.Mods.Common.AI
{
HashSet<string> actors;
if (!ai.Info.BuildingCommonNames.TryGetValue(commonName, out actors))
throw new InvalidOperationException("Can't find {0} in the HackyAI BuildingCommonNames definition.".F(commonName));
return null;
var available = buildables.Where(actor =>
{