diff --git a/src/main/java/net/rptools/maptool/client/AppUtil.java b/src/main/java/net/rptools/maptool/client/AppUtil.java index e89e94caae..dc26950953 100644 --- a/src/main/java/net/rptools/maptool/client/AppUtil.java +++ b/src/main/java/net/rptools/maptool/client/AppUtil.java @@ -216,6 +216,11 @@ public static Path getInstallDirectory() { path = path.getParent().getParent().getParent(); } else { // First try to find MapTool* directory in path while (path != null) { + if (path.getFileName() == null) { + // We have gone too far! + path = null; + break; + } if (path.getFileName().toString().matches("(?i).*maptool.*")) { break; }