From 9b9a4ec76a28ca9882473f10a25f7096821e7e3e Mon Sep 17 00:00:00 2001 From: KOGA Mitsuhiro Date: Thu, 8 Sep 2022 15:08:50 +0900 Subject: [PATCH] fix: prevent NullReferenceException in TimeoutController --- src/UniTask/Assets/Plugins/UniTask/Runtime/TimeoutController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/TimeoutController.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/TimeoutController.cs index ad95cb5..63782a9 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/TimeoutController.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/TimeoutController.cs @@ -109,7 +109,7 @@ namespace Cysharp.Threading.Tasks try { // stop timer. - timer.Dispose(); + timer?.Dispose(); // cancel and dispose. timeoutSource.Cancel();