don't crash on missing voice phrases

This commit is contained in:
Chris Forbes
2011-12-19 14:39:00 +13:00
parent aa9dd73fe5
commit 23a9e0503d

View File

@@ -238,6 +238,9 @@ namespace OpenRA
var vi = Rules.Voices[mi.Voice.ToLowerInvariant()];
if (!vi.Pools.Value.ContainsKey(phrase))
return false;
var clip = vi.Pools.Value[phrase].GetNext();
if (clip == null)
return false;