Fixed null pointer exception in config.getMapList().

This commit is contained in:
Kevin 2012-02-28 21:20:32 -08:00 committed by EvilSeph
parent 0b50669c8b
commit a3038f4615

View File

@ -785,6 +785,10 @@ public class MemorySection implements ConfigurationSection {
List<?> list = getList(path); List<?> list = getList(path);
List<Map<?, ?>> result = new ArrayList<Map<?, ?>>(); List<Map<?, ?>> result = new ArrayList<Map<?, ?>>();
if (list == null) {
return result;
}
for (Object object : list) { for (Object object : list) {
if (object instanceof Map) { if (object instanceof Map) {
result.add((Map<?, ?>) object); result.add((Map<?, ?>) object);