Fix potential NRE in HTTP activities when attempting to determine target type

This commit is contained in:
Sipke Schoorstra 2023-01-17 12:22:44 +01:00
parent 9351671b06
commit 9fc01875d2

View file

@ -8,9 +8,9 @@ internal static class OutputExtensions
/// <summary>
/// Gets the target type of the specified variable type.
/// </summary>
public static Type? GetTargetType(this Output output, ActivityExecutionContext context)
public static Type? GetTargetType(this Output? output, ActivityExecutionContext context)
{
var memoryBlock = output.MemoryBlockReference() is Variable variable
var memoryBlock = output?.MemoryBlockReference() is Variable variable
? context.WorkflowExecutionContext.MemoryRegister.TryGetBlock(variable.Id, out var block)
? block
: default