Skip to content

Commit 24498cb

Browse files
committed
[PDB] Fix crash when no default calling convention is registered
Fixes #8196
1 parent 736c591 commit 24498cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/pdb-ng/src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
121121

122122
let default_cc = platform
123123
.get_default_calling_convention()
124-
.expect("Expected default calling convention");
124+
.ok_or_else(|| anyhow!("Cannot parse to view with no default calling convention"))?;
125125

126126
let thiscall_cc = Self::find_calling_convention(platform.as_ref(), "thiscall")
127127
.unwrap_or(default_cc.clone());

0 commit comments

Comments
 (0)