Fixed null pointer exception in config.getMapList().
This commit is contained in:
parent
0b50669c8b
commit
a3038f4615
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user