From 24498cb5dc8cab154d827c168b17786cf1046d4b Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 26 May 2026 10:34:52 -0400 Subject: [PDB] Fix crash when no default calling convention is registered Fixes https://github.com/Vector35/binaryninja-api/issues/8196 --- plugins/pdb-ng/src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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()); -- cgit v1.3.1