From c2a6b4b577514b46783997812d3f678e21a2fe41 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Thu, 2 Sep 2021 11:29:32 +0200 Subject: [PATCH] Fixed NullReferenceException when flow disappears in between locks --- Tapeti.Flow/Default/FlowStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tapeti.Flow/Default/FlowStore.cs b/Tapeti.Flow/Default/FlowStore.cs index 06eb01e..2a9a8ad 100644 --- a/Tapeti.Flow/Default/FlowStore.cs +++ b/Tapeti.Flow/Default/FlowStore.cs @@ -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)