Fix a NRE in the exception handler.

This commit is contained in:
Paul Chote
2013-11-09 15:24:58 +13:00
parent 20f88387b6
commit 6aee253c94
2 changed files with 15 additions and 3 deletions

View File

@@ -257,7 +257,14 @@ namespace OpenRA
public static Dictionary<String, Mod> CurrentMods
{
get { return Mod.AllMods.Where(k => modData.Manifest.Mods.Contains(k.Key)).ToDictionary(k => k.Key, k => k.Value); }
get
{
// Initialization hasn't completed yet
if (Mod.AllMods == null || modData == null)
return null;
return Mod.AllMods.Where(k => modData.Manifest.Mods.Contains(k.Key)).ToDictionary(k => k.Key, k => k.Value);
}
}
static Modifiers modifiers;