From 1ebc7581d89089f7acd66e72fb1a87ee8352c83f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 1 Oct 2017 22:20:59 +0200 Subject: [PATCH] Fix IsUsedAsThisPointerInCall: if we deal with an unspecified generic type, we assume it's a value type as ldloca should be allowed as this pointer in those cases. --- ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs b/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs index 73ada8d7b..d5dd01d6e 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs @@ -206,7 +206,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms { if (ldloca.ChildIndex != 0) return false; - if (ldloca.Variable.Type.IsReferenceType != false) + if (ldloca.Variable.Type.IsReferenceType ?? false) return false; switch (ldloca.Parent.OpCode) { case OpCode.Call: