From c238eb3afde5a2376bdb43f5f69f32c32018de13 Mon Sep 17 00:00:00 2001 From: Brendan Robert Date: Fri, 22 May 2015 00:17:21 -0500 Subject: [PATCH] Added null checks for new maps --- .../outlaweditor/ui/impl/MapEditorTabControllerImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OutlawEditor/src/main/java/org/badvision/outlaweditor/ui/impl/MapEditorTabControllerImpl.java b/OutlawEditor/src/main/java/org/badvision/outlaweditor/ui/impl/MapEditorTabControllerImpl.java index 5447553c..d03ea66a 100644 --- a/OutlawEditor/src/main/java/org/badvision/outlaweditor/ui/impl/MapEditorTabControllerImpl.java +++ b/OutlawEditor/src/main/java/org/badvision/outlaweditor/ui/impl/MapEditorTabControllerImpl.java @@ -442,6 +442,9 @@ public class MapEditorTabControllerImpl extends MapEditorTabController { } private void sortScripts(Map m) { + if (m == null || m.getScripts() == null || m.getScripts().getScript() == null) { + return; + } m.getScripts().getScript().sort((a, b) -> { if (a.getName().equalsIgnoreCase("init")) { return -1;