diff --git a/src/CLR/Core/Interpreter.cpp b/src/CLR/Core/Interpreter.cpp index 9509f7d37d..4a3f1cd371 100644 --- a/src/CLR/Core/Interpreter.cpp +++ b/src/CLR/Core/Interpreter.cpp @@ -2378,7 +2378,10 @@ HRESULT CLR_RT_Thread::Execute_IL(CLR_RT_StackFrame &stackArg) CLR_RT_HeapBlock *top; CLR_INT32 changes; - cls.InitializeFromMethod(calleeInst); // This is the class to create! + if (!calleeInst.GetDeclaringType(cls)) + { + NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); + } evalPos++;