Browse Source

Fix NullReferenceException in SplitVariables.AddressUsedOnlyForReading

pull/863/head
Daniel Grunwald 8 years ago
parent
commit
df27dc9686
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/SplitVariables.cs

2
ICSharpCode.Decompiler/IL/Transforms/SplitVariables.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
// but we need to split awaiter variables to make async/await pretty.
return true;
case Call call:
if (call.Method.DeclaringTypeDefinition.KnownTypeCode == TypeSystem.KnownTypeCode.NullableOfT) {
if (call.Method.DeclaringTypeDefinition?.KnownTypeCode == TypeSystem.KnownTypeCode.NullableOfT) {
switch (call.Method.Name) {
case "get_HasValue":
case "get_Value":

Loading…
Cancel
Save