зеркало из https://github.com/mono/ikvm-fork.git
Don't try to return a MethodBody if it isn't in IL.
This commit is contained in:
Родитель
5de77bb9f7
Коммит
2ec4aae085
|
@ -55,6 +55,11 @@ namespace IKVM.Reflection.Reader
|
||||||
|
|
||||||
internal MethodBody GetMethodBody(IGenericContext context)
|
internal MethodBody GetMethodBody(IGenericContext context)
|
||||||
{
|
{
|
||||||
|
if ((GetMethodImplementationFlags() & MethodImplAttributes.CodeTypeMask) != MethodImplAttributes.IL)
|
||||||
|
{
|
||||||
|
// method is not IL
|
||||||
|
return null;
|
||||||
|
}
|
||||||
int rva = module.MethodDef.records[index].RVA;
|
int rva = module.MethodDef.records[index].RVA;
|
||||||
return rva == 0 ? null : new MethodBody(module, rva, context);
|
return rva == 0 ? null : new MethodBody(module, rva, context);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче