Try and avoid an NPE in crash reports

This commit is contained in:
Christian 2012-10-18 14:41:32 -04:00
parent 3599c11599
commit 5b4de7b2b5

View file

@ -427,7 +427,7 @@ public class Loader
public List<ModContainer> getModList() public List<ModContainer> getModList()
{ {
return ImmutableList.copyOf(instance().mods); return instance().mods != null ? ImmutableList.copyOf(instance().mods) : ImmutableList.<ModContainer>of();
} }
/** /**
@ -663,7 +663,7 @@ public class Loader
public List<ModContainer> getActiveModList() public List<ModContainer> getActiveModList()
{ {
return modController.getActiveModList(); return modController != null ? modController.getActiveModList() : ImmutableList.<ModContainer>of();
} }
public ModState getModState(ModContainer selectedMod) public ModState getModState(ModContainer selectedMod)