Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
Fix ref proxy NRE
Browse files Browse the repository at this point in the history
  • Loading branch information
yck1509 committed Nov 20, 2015
1 parent 02492b3 commit f9bdba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Confuser.Protections/ReferenceProxy/StrongMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public override void Finalize(RPContext ctx) {

void EncodeField(object sender, ModuleWriterListenerEventArgs e) {
var writer = (ModuleWriterBase)sender;
if (e.WriterEvent == ModuleWriterEvent.MDMemberDefRidsAllocated) {
if (e.WriterEvent == ModuleWriterEvent.MDMemberDefRidsAllocated && keyAttrs != null) {
Dictionary<TypeDef, Func<int, int>> keyFuncs = keyAttrs
.Where(entry => entry != null)
.ToDictionary(entry => entry.Item1, entry => entry.Item2);
Expand Down

0 comments on commit f9bdba9

Please sign in to comment.