Skip to content

Commit

Permalink
Perform null check when calling Start on DriverService (#8083)
Browse files Browse the repository at this point in the history
* Perform null check when calling Start on DriverService

* Updates documentation

Co-authored-by: David Burns <[email protected]>
  • Loading branch information
AutomatedTester authored Mar 5, 2020
1 parent b067768 commit 73e6405
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dotnet/src/webdriver/DriverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,14 @@ public void Dispose()
}

/// <summary>
/// Starts the DriverService.
/// Starts the DriverService if it is not already running.
/// </summary>
[SecurityPermission(SecurityAction.Demand)]
public void Start()
{
if(this.driverServiceProcess != null)
return;

this.driverServiceProcess = new Process();
this.driverServiceProcess.StartInfo.FileName = Path.Combine(this.driverServicePath, this.driverServiceExecutableName);
this.driverServiceProcess.StartInfo.Arguments = this.CommandLineArguments;
Expand Down

0 comments on commit 73e6405

Please sign in to comment.