don't crash when sound rules are not loaded
e.g. when trying to get the gamefiles
This commit is contained in:
committed by
Chris Forbes
parent
f0708ecfb2
commit
208a3a47fe
@@ -251,7 +251,10 @@ namespace OpenRA
|
||||
{
|
||||
if (definition == null) return false;
|
||||
|
||||
if (Rules.Voices == null) return false;
|
||||
if (Rules.Notifications == null) return false;
|
||||
var rules = (voicedUnit != null) ? Rules.Voices[type] : Rules.Notifications[type];
|
||||
if (rules == null) return false;
|
||||
|
||||
var ID = (voicedUnit != null) ? voicedUnit.ActorID : 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user