Skip to content
3 changes: 2 additions & 1 deletion src/NHibernate/Proxy/NHibernateProxyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ private static void EmitCallBaseIfLazyInitializerIsNull(
if (method.DeclaringType.IsInterface &&
method.DeclaringType.IsAssignableFrom(parentType))
{
Delegate
var interfaceMap = parentType.GetInterfaceMap(method.DeclaringType);
var methodIndex = Array.IndexOf(interfaceMap.InterfaceMethods, method);
method = interfaceMap.TargetMethods[methodIndex];
Expand Down Expand Up @@ -462,7 +463,7 @@ private static void EmitCallBaseIfLazyInitializerIsNull(
*/

IL.Emit(OpCodes.Ldarg_0);
EmitCallMethod(IL, method.DeclaringType.IsInterface ? OpCodes.Callvirt : OpCodes.Call, method);
EmitCallMethod(IL, OpCodes.Call, method);
IL.Emit(OpCodes.Ret);
}

Expand Down