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;