From 1521ec8071b8ba8cffd57c33ddfb5a92b8a7f3cb Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 17 Dec 2017 02:38:04 +0900 Subject: [PATCH] Fix nullreferenceexception --- BTCPayServer/BTCPayServer.csproj | 2 +- BTCPayServer/Views/Shared/_Layout.cshtml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 0210f171c..b3a78307e 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -2,7 +2,7 @@ Exe netcoreapp2.0 - 1.0.0.40 + 1.0.0.41 diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index 173e96f92..fcbe50f32 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -9,10 +9,11 @@ var lastStatus = waiter.Instance.LastStatus; var synching = waiterState == NBXplorerState.Synching && + lastStatus != null && lastStatus.NodeBlocks.HasValue && lastStatus.NodeHeaders.HasValue && lastStatus.VerificationProgress.HasValue; - var verificationProgress = lastStatus.VerificationProgress.HasValue ? lastStatus.VerificationProgress.Value * 100 : 0.0; + var verificationProgress = lastStatus != null && lastStatus.VerificationProgress.HasValue ? lastStatus.VerificationProgress.Value * 100 : 0.0; }