From 5beafed2798c7dfa2fb62e7a4a7ff08254a71f1f Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 10 Mar 2014 19:34:11 +0000 Subject: [PATCH] Null check the locations.yml Map before changing into a CaseInsensitiveMap (Fixes #920) --- .../bungee/module/reconnect/yaml/YamlReconnectHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java b/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java index 5c88bb852..3578bc21b 100644 --- a/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java +++ b/module/reconnect-yaml/src/main/java/net/md_5/bungee/module/reconnect/yaml/YamlReconnectHandler.java @@ -35,7 +35,11 @@ public class YamlReconnectHandler extends AbstractReconnectHandler file.createNewFile(); try ( FileReader rd = new FileReader( file ) ) { - data = new CaseInsensitiveMap<>( yaml.loadAs( rd, Map.class ) ); + Map map = yaml.loadAs( rd, Map.class ); + if ( map != null ) + { + data = new CaseInsensitiveMap<>( map ); + } } } catch ( YAMLException ex ) {