Added null checks for new maps

This commit is contained in:
Brendan Robert 2015-05-22 00:17:21 -05:00
parent c24db71b78
commit c238eb3afd

View File

@ -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;