Skip to content

Commit

Permalink
Fix nullpointer in file check
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfav committed Oct 4, 2017
1 parent 6c43036 commit e7d0b37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/at/favre/tools/dice/RndTool.java
Expand Up @@ -99,7 +99,8 @@ static boolean execute(Arg arguments) {
System.exit(403);
}

if (arguments.outFile() != null && !arguments.outFile().getParentFile().exists()) {
if (arguments.outFile() != null && arguments.outFile().getParentFile() != null
&& !arguments.outFile().getParentFile().exists()) {
if (!arguments.outFile().getParentFile().mkdirs()) {
System.err.println("could not generate dir structure for " + arguments.outFile());
System.exit(404);
Expand Down

0 comments on commit e7d0b37

Please sign in to comment.