Skip to content

Commit

Permalink
fixed ScriptCollection crash when script dir not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
topi-banana committed Sep 22, 2024
1 parent 8cc9c4e commit 9d6e08f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public class ScriptCollection {

public static void load() {
URL scripts = CLASS_LOADER.getResource(String.format("%s/scripts/", ASSETS_PATH));
if (scripts == null) {
return;
}
File scriptDir = new File(scripts.getPath());
File[] scriptFiles = scriptDir.listFiles();
for (File scriptFile : scriptFiles) {
Expand Down

0 comments on commit 9d6e08f

Please sign in to comment.