Skip to content

Commit f5e8512

Browse files
Add missing null check
1 parent 4ef3581 commit f5e8512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ILSpy/ExtensionMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static U[] SelectArray<T, U>(this ICollection<T> collection, Func<T, U> f
7979
public static ICompilation? GetTypeSystemWithCurrentOptionsOrNull(this MetadataFile file, SettingsService settingsService, LanguageVersion languageVersion)
8080
{
8181
var decompilerSettings = settingsService.DecompilerSettings.Clone();
82-
if (!Enum.TryParse(languageVersion.Version, out Decompiler.CSharp.LanguageVersion csharpLanguageVersion))
82+
if (!Enum.TryParse(languageVersion?.Version, out Decompiler.CSharp.LanguageVersion csharpLanguageVersion))
8383
csharpLanguageVersion = Decompiler.CSharp.LanguageVersion.Latest;
8484
decompilerSettings.SetLanguageVersion(csharpLanguageVersion);
8585
return file

0 commit comments

Comments
 (0)