summaryrefslogtreecommitdiff
path: root/architecture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'architecture.cpp')
-rw-r--r--architecture.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/architecture.cpp b/architecture.cpp
index 7fcc43a8..3c44202f 100644
--- a/architecture.cpp
+++ b/architecture.cpp
@@ -1252,7 +1252,10 @@ void Architecture::RegisterRelocationHandler(const string& viewName, RelocationH
Ref<RelocationHandler> Architecture::GetRelocationHandler(const std::string& viewName)
{
- return new CoreRelocationHandler(BNArchitectureGetRelocationHandler(m_object, viewName.c_str()));
+ auto handler = BNArchitectureGetRelocationHandler(m_object, viewName.c_str());
+ if (!handler)
+ return nullptr;
+ return new CoreRelocationHandler(handler);
}
bool Architecture::IsBinaryViewTypeConstantDefined(const string& type, const string& name)