Fix a crash when protected properties are [Sync]ed.

This commit is contained in:
Mustafa Alperen Seki
2018-11-05 16:43:58 +03:00
committed by abcdefg30
parent 3224843d70
commit 4987d45f23

View File

@@ -96,7 +96,7 @@ namespace OpenRA
foreach (var prop in t.GetProperties(Binding).Where(x => x.HasAttribute<SyncAttribute>()))
{
il.Emit(OpCodes.Ldloc, this_);
il.EmitCall(OpCodes.Call, prop.GetGetMethod(), null);
il.EmitCall(OpCodes.Call, prop.GetGetMethod(true), null);
EmitSyncOpcodes(prop.PropertyType, il);
}