Skip to content

Commit c44c701

Browse files
committed
Fix exception when hot reloading
1 parent 55812d7 commit c44c701

File tree

1 file changed

+4
-2
lines changed
  • de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests

1 file changed

+4
-2
lines changed

de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/RunMap.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ private String compileMap(ModelManager modelManager, WurstGui gui, WurstProjectC
9898

9999
// first we copy in same location to ensure validity
100100
File buildDir = getBuildDir();
101-
mapLastModified = map.get().lastModified();
102-
mapPath = map.get().getAbsolutePath();
101+
if (map.isPresent()) {
102+
mapLastModified = map.get().lastModified();
103+
mapPath = map.get().getAbsolutePath();
104+
}
103105
Optional<File> testMap = map.map($ -> new File(buildDir, "WurstRunMap.w3x"));
104106
CompilationResult result = compileScript(modelManager, gui, testMap, projectConfig, buildDir, false);
105107

0 commit comments

Comments
 (0)