diff --git a/de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/RunMap.java b/de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/RunMap.java index ee83ffa4b..314c2b2c2 100644 --- a/de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/RunMap.java +++ b/de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/RunMap.java @@ -98,8 +98,10 @@ private String compileMap(ModelManager modelManager, WurstGui gui, WurstProjectC // first we copy in same location to ensure validity File buildDir = getBuildDir(); - mapLastModified = map.get().lastModified(); - mapPath = map.get().getAbsolutePath(); + if (map.isPresent()) { + mapLastModified = map.get().lastModified(); + mapPath = map.get().getAbsolutePath(); + } Optional testMap = map.map($ -> new File(buildDir, "WurstRunMap.w3x")); CompilationResult result = compileScript(modelManager, gui, testMap, projectConfig, buildDir, false);