Skip to content

Commit b81f402

Browse files
authored
Merge 41e4eb4 into 0c65d32
2 parents 0c65d32 + 41e4eb4 commit b81f402

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Confuser.Renamer/VTable.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ public static VTable ConstructVTable(TypeDef typeDef, VTableStorage storage) {
227227
});
228228
}
229229
else {
230-
var targetSlot = vTbl.AllSlots.Single(slot => slot.MethodDef == targetMethod);
230+
var targetSlot = vTbl.AllSlots.SingleOrDefault(slot => slot.MethodDef == targetMethod);
231+
if (targetSlot == null) {
232+
throw new Exception($"method [{method}] not found.");
233+
}
231234
CheckKeyExist(storage, vTbl.SlotsMap, targetSlot.Signature, "MethodImpl Normal Sig");
232235
targetSlot = vTbl.SlotsMap[targetSlot.Signature]; // Use the most derived slot
233236
// Maybe implemented by above processes --- this process should take priority

0 commit comments

Comments
 (0)