summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2026-05-26 10:34:52 -0400
committerMason Reed <mason@vector35.com>2026-05-26 10:35:59 -0400
commit24498cb5dc8cab154d827c168b17786cf1046d4b (patch)
treeadc137be2b42e1e8d1169a6e22ae013335eb260c /plugins
parent736c59125c86343723957298351225f21dbb78b5 (diff)
[PDB] Fix crash when no default calling convention is registered
Fixes https://github.com/Vector35/binaryninja-api/issues/8196
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pdb-ng/src/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/pdb-ng/src/parser.rs b/plugins/pdb-ng/src/parser.rs
index 8c33fe64..bb597985 100644
--- a/plugins/pdb-ng/src/parser.rs
+++ b/plugins/pdb-ng/src/parser.rs
@@ -121,7 +121,7 @@ impl<'a, S: Source<'a> + 'a> PDBParserInstance<'a, S> {
let default_cc = platform
.get_default_calling_convention()
- .expect("Expected default calling convention");
+ .ok_or_else(|| anyhow!("Cannot parse to view with no default calling convention"))?;
let thiscall_cc = Self::find_calling_convention(platform.as_ref(), "thiscall")
.unwrap_or(default_cc.clone());