Skip to content

Commit

Permalink
Only try and set the Firefox profile if it's not null.
Browse files Browse the repository at this point in the history
Otherwise, we get an exception being thrown, which is less
than ideal.
  • Loading branch information
shs96c committed Oct 4, 2016
1 parent e198580 commit 49888b6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ FirefoxOptions setProfileSafely(FirefoxProfile profile) {
Preconditions.checkState(
this.profile == null || this.profile.equals(profile),
"Profile passed to options is different from existing profile that has been set.");
if (profile == null) {
return this;
}
return setProfile(profile);
}

Expand Down

0 comments on commit 49888b6

Please sign in to comment.