Fix a crash when protected properties are [Sync]ed.
This commit is contained in:
committed by
abcdefg30
parent
3224843d70
commit
4987d45f23
@@ -96,7 +96,7 @@ namespace OpenRA
|
|||||||
foreach (var prop in t.GetProperties(Binding).Where(x => x.HasAttribute<SyncAttribute>()))
|
foreach (var prop in t.GetProperties(Binding).Where(x => x.HasAttribute<SyncAttribute>()))
|
||||||
{
|
{
|
||||||
il.Emit(OpCodes.Ldloc, this_);
|
il.Emit(OpCodes.Ldloc, this_);
|
||||||
il.EmitCall(OpCodes.Call, prop.GetGetMethod(), null);
|
il.EmitCall(OpCodes.Call, prop.GetGetMethod(true), null);
|
||||||
|
|
||||||
EmitSyncOpcodes(prop.PropertyType, il);
|
EmitSyncOpcodes(prop.PropertyType, il);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user