make it crash nicely when you inherit from a bogus actor type
This commit is contained in:
committed by
Chris Forbes
parent
cee021ef17
commit
1af23079eb
@@ -39,9 +39,10 @@ namespace OpenRA
|
||||
return null;
|
||||
|
||||
MiniYaml parent;
|
||||
allUnits.TryGetValue( inherits.Value, out parent );
|
||||
if( parent == null )
|
||||
return null;
|
||||
allUnits.TryGetValue( inherits.Value, out parent );
|
||||
if (parent == null)
|
||||
throw new InvalidOperationException(
|
||||
"Bogus inheritance -- actor type {0} does not exist".F(inherits.Value));
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user