Skip to content

Commit

Permalink
Fix null ref in 'OnEventWritten()' (#3593)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingluoHuang authored Nov 25, 2024
1 parent c46dac6 commit 078eb3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Runner.Common/HostContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData)
payload[0] = Enum.Parse(typeof(GitHub.Services.Common.VssCredentialsType), ((int)payload[0]).ToString());
}

if (payload.Length > 0)
if (payload.Length > 0 && !string.IsNullOrEmpty(eventData.Message))
{
message = String.Format(eventData.Message.Replace("%n", Environment.NewLine), payload);
}
Expand Down

0 comments on commit 078eb3b

Please sign in to comment.