Fail gracefully when there is just one default difficulty.
This commit is contained in:
committed by
abcdefg30
parent
a59f4b2c4a
commit
a502e85e68
@@ -109,7 +109,10 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
.FirstOrDefault(sld => sld.Info.ID == id);
|
||||
|
||||
if (option == null)
|
||||
throw new YamlException("A ScriptLobbyDropdown with ID `" + id + "` was not found.");
|
||||
{
|
||||
Log.Write("lua", "A ScriptLobbyDropdown with ID `" + id + "` was not found.");
|
||||
return null;
|
||||
}
|
||||
|
||||
return option.Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user