Skip to content

Commit 421be95

Browse files
authored
[cDAC] fix bug in DacDbi GetTypeHandle (#127968)
Return exception HResult when type not found
1 parent 6e51f76 commit 421be95

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi

src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,8 @@ public int GetTypeHandle(ulong vmModule, uint metadataToken, ulong* pRetVal)
13071307
default:
13081308
throw Marshal.GetExceptionForHR(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
13091309
}
1310+
if (*pRetVal == 0)
1311+
throw Marshal.GetExceptionForHR(CorDbgHResults.CORDBG_E_CLASS_NOT_LOADED)!;
13101312
}
13111313
catch (System.Exception ex)
13121314
{

0 commit comments

Comments
 (0)