Fix potential NRE in HTTP activities when attempting to determine target type
This commit is contained in:
parent
9351671b06
commit
9fc01875d2
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue