Fix NPE in update (sorry again :P)

This commit is contained in:
Chris Ward 2012-12-20 15:45:09 +11:00
parent 79a44b919c
commit d01d6bcd1b

View file

@ -801,7 +801,12 @@ public class EssentialsUpgrade
{
EssentialsConf config = new EssentialsConf(file);
config.load();
Set<String> homes = config.getConfigurationSection("homes").getKeys(true);
ConfigurationSection homesSection = config.getConfigurationSection("homes");
if(homesSection == null)
{
continue;
}
Set<String> homes = homesSection.getKeys(true);
for(String s : homes)
{
if(!s.contains(".") && Util.isInt(s))