Skip to content

Commit 6f38bbf

Browse files
Add nullability guards to remaining comparison overlay tasks
The Blocking, Memory, and IO branches in the comparison overlay section of CorrelatedTimelineLanesControl were missing the `&& Result != null` guard the CPU and Wait branches already had. Apply uniformly so a null result from `_dataService.Get*TrendAsync` can't NRE on the subsequent .Select / .GroupBy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a88d73f commit 6f38bbf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lite/Controls/CorrelatedTimelineLanesControl.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,19 @@ await Task.WhenAll(cpuTask, waitTask, blockingTask, deadlockTask, memoryTask, fi
182182
AddGhostLine(WaitStatsChart, refWaitTask.Result
183183
.Select(d => (d.CollectionTime.AddMinutes(utcOffset).Add(timeShift).ToOADate(), d.WaitTimeMsPerSecond)).ToList(), "#FFB74D");
184184

185-
if (refBlockingTask.IsCompletedSuccessfully)
185+
if (refBlockingTask.IsCompletedSuccessfully && refBlockingTask.Result != null)
186186
{
187187
var refBlocking = refBlockingTask.Result
188188
.Select(d => (d.Time.AddMinutes(utcOffset).Add(timeShift).ToOADate(), (double)d.Count)).ToList();
189189
if (refBlocking.Count > 0)
190190
AddGhostLine(BlockingChart, refBlocking, "#E57373");
191191
}
192192

193-
if (refMemoryTask.IsCompletedSuccessfully)
193+
if (refMemoryTask.IsCompletedSuccessfully && refMemoryTask.Result != null)
194194
AddGhostLine(MemoryChart, refMemoryTask.Result
195195
.Select(d => (d.CollectionTime.AddMinutes(utcOffset).Add(timeShift).ToOADate(), d.BufferPoolMb)).ToList(), "#CE93D8");
196196

197-
if (refIoTask.IsCompletedSuccessfully)
197+
if (refIoTask.IsCompletedSuccessfully && refIoTask.Result != null)
198198
{
199199
var refIo = refIoTask.Result
200200
.GroupBy(d => d.CollectionTime)

0 commit comments

Comments
 (0)