Skip to content

Commit 5efdf42

Browse files
committed
Preventing NPE while creating a dir for the result file (RC). Fixes issue 6695
1 parent 701bb94 commit 5efdf42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/server/src/org/openqa/selenium/server/SeleniumServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ protected void runHtmlSuite() {
625625
String resultFilePath = getRequiredSystemProperty("htmlSuite.resultFilePath");
626626
File resultFile = new File(resultFilePath);
627627
File resultDir = resultFile.getParentFile();
628-
if (!resultDir.exists() && !resultDir.mkdirs()) {
628+
if ((resultDir != null) && !resultDir.exists() && !resultDir.mkdirs()) {
629629
RemoteControlLauncher.usage("can't create directory for result file " + resultFilePath);
630630
System.exit(1);
631631
}

0 commit comments

Comments
 (0)