From 261fddaa4ec17b315ac38fc80e338b08d3c77530 Mon Sep 17 00:00:00 2001 From: mr-miles Date: Sat, 18 Apr 2026 17:58:59 +0100 Subject: [PATCH] Add null check for result in WriteAsync Add null check for result parameter in WriteAsync method. --- src/DotnetDiffCoverage/Output/JsonReporter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DotnetDiffCoverage/Output/JsonReporter.cs b/src/DotnetDiffCoverage/Output/JsonReporter.cs index 757d54c..1732c09 100644 --- a/src/DotnetDiffCoverage/Output/JsonReporter.cs +++ b/src/DotnetDiffCoverage/Output/JsonReporter.cs @@ -15,6 +15,11 @@ public sealed class JsonReporter public async Task WriteAsync(CrossReferenceResult result, Stream stream) { + if (result == null) + { + return; + } + var report = new { summary = new