Skip to content

Commit

Permalink
check to make sure there is a filename before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
cwisniew committed Nov 3, 2023
1 parent 149696d commit ca8aa74
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/net/rptools/maptool/client/AppUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ca8aa74

Please sign in to comment.