From b14c3a0ef8924ac98c513d212ed64cb67fc06b29 Mon Sep 17 00:00:00 2001 From: Maksim Strebkov <257byte@gmail.com> Date: Sun, 14 Jul 2024 22:11:02 +0300 Subject: [PATCH] Fix SelectionSingleConverter on empty response --- Tzkt.Api/Utils/Converters/SelectionSingleConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tzkt.Api/Utils/Converters/SelectionSingleConverter.cs b/Tzkt.Api/Utils/Converters/SelectionSingleConverter.cs index 33b8f7fc..4315e9b9 100644 --- a/Tzkt.Api/Utils/Converters/SelectionSingleConverter.cs +++ b/Tzkt.Api/Utils/Converters/SelectionSingleConverter.cs @@ -15,7 +15,7 @@ public override void Write(Utf8JsonWriter writer, SelectionSingleResponse value, writer.WriteStartObject(); for (int j = 0; j < value.Cols.Length; j++) { - if (value.Vals[j] == null) + if (value.Vals?[j] == null) writer.WriteNull(value.Cols[j]); else {