Skip to content

Commit

Permalink
Fix potential NRE in HTTP activities when attempting to determine tar…
Browse files Browse the repository at this point in the history
…get type
  • Loading branch information
sfmskywalker committed Jan 17, 2023
1 parent 9351671 commit 9fc0187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/Elsa.Http/Extensions/OutputExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9fc0187

Please sign in to comment.