Adds null check for worker

This commit is contained in:
Neil Dorin
2021-02-26 14:03:43 -07:00
parent 16bc2ca381
commit cc02cbfe74

View File

@@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core.Utilities
/// </summary>
public void StartSequence()
{
if (_worker.ThreadState == Thread.eThreadStates.ThreadRunning)
if (_worker != null && _worker.ThreadState == Thread.eThreadStates.ThreadRunning)
{
Debug.Console(1, this, "Thread already running. Cannot Start Sequence");
return;