From 53befc68c9c278d29e2833fc047288022701c827 Mon Sep 17 00:00:00 2001 From: LC Date: Tue, 21 Jul 2026 11:44:51 -0400 Subject: [PATCH] PassManager: Ensure GetPass() only queries the underlying pass mappings Previously this would create an entry in the map if it didn't exist. --- FEXCore/Source/Interface/IR/PassManager.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FEXCore/Source/Interface/IR/PassManager.h b/FEXCore/Source/Interface/IR/PassManager.h index a6218c183..2f01a3869 100644 --- a/FEXCore/Source/Interface/IR/PassManager.h +++ b/FEXCore/Source/Interface/IR/PassManager.h @@ -63,7 +63,11 @@ public: return dynamic_cast(GetPass(Name)); } Pass* GetPass(const fextl::string& Name) { - return NameToPassMaping[Name]; + const auto Iter = NameToPassMaping.find(Name); + if (Iter == NameToPassMaping.end()) { + return nullptr; + } + return Iter->second; } // Finalizes the pass manager state and assumes no other passes will be added after called.