Try and avoid an NPE in crash reports

This commit is contained in:
Christian committed 2012-10-18 14:41:32 -04:00
1 parent 002951804a
commit 470a18522c
1 file changed
+2 -2
+2 -2
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)