Skip to content

Commit

Permalink
Fix exception when hot reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Frotty committed Jan 6, 2025
1 parent 55812d7 commit c44c701
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<File> testMap = map.map($ -> new File(buildDir, "WurstRunMap.w3x"));
CompilationResult result = compileScript(modelManager, gui, testMap, projectConfig, buildDir, false);

Expand Down

0 comments on commit c44c701

Please sign in to comment.