Fixed NullReferenceException when flow disappears in between locks

This commit is contained in:
Mark van Renswoude 2021-09-02 11:29:32 +02:00
parent aded39981c
commit c2a6b4b577
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ namespace Tapeti.Flow.Default
if (flowLock == null)
throw new ObjectDisposedException("FlowStateLock");
return Task.FromResult(cachedFlowState.FlowState?.Clone());
return Task.FromResult(cachedFlowState?.FlowState?.Clone());
}
public async Task StoreFlowState(FlowState newFlowState, bool persistent)