Skip to content

Commit

Permalink
Merge pull request #2172 from OmniSharp/avoid-null-reference
Browse files Browse the repository at this point in the history
Defend against null value in BuildErrorEventArgs
  • Loading branch information
filipw authored Jun 7, 2021
2 parents c852b27 + caaba64 commit 5b7fe24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OmniSharp.MSBuild/Logging/MSBuildDiagnostic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static MSBuildDiagnostic CreateFrom(Microsoft.Build.Framework.BuildErrorE

// https://github.com/dotnet/msbuild/blob/v16.8.3/src/Tasks/Resources/Strings.resx#L2155-L2158
// for MSB3644, we should print a different message on Unix because the default one is Windows-specific
if (args.Code.Equals("MSB3644", StringComparison.OrdinalIgnoreCase))
if (args.Code?.Equals("MSB3644", StringComparison.OrdinalIgnoreCase) == true)
{
// https://github.com/dotnet/msbuild/issues/5820
// older versions of MSBuild incorrectly treat 'net5.0'/'net6.0' moniker as ".NETFramework,Version=v5.0/6.0"
Expand Down

0 comments on commit 5b7fe24

Please sign in to comment.