Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Defend against null value in BuildErrorEventArgs #2172

Merged
merged 1 commit into from
Jun 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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