Skip to content

Commit f429192

Browse files
committed
Add null check to prevent crash when BinaryView::GetAnalysisFunction called with null platform
1 parent b3cfd46 commit f429192

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

binaryview.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,6 +2286,8 @@ bool BinaryView::HasDataVariables() const
22862286

22872287
Ref<Function> BinaryView::GetAnalysisFunction(Platform* platform, uint64_t addr)
22882288
{
2289+
if (!platform)
2290+
return nullptr;
22892291
BNFunction* func = BNGetAnalysisFunction(m_object, platform->GetObject(), addr);
22902292
if (!func)
22912293
return nullptr;

0 commit comments

Comments
 (0)