Don't try to return a MethodBody if it isn't in IL.

This commit is contained in:
jfrijters 2010-04-18 09:02:54 +00:00
Родитель 5de77bb9f7
Коммит 2ec4aae085
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -55,6 +55,11 @@ namespace IKVM.Reflection.Reader
internal MethodBody GetMethodBody(IGenericContext context)
{
if ((GetMethodImplementationFlags() & MethodImplAttributes.CodeTypeMask) != MethodImplAttributes.IL)
{
// method is not IL
return null;
}
int rva = module.MethodDef.records[index].RVA;
return rva == 0 ? null : new MethodBody(module, rva, context);
}