Skip to content

Commit 0192614

Browse files
author
Bar Soloveychik
committed
added nullptr check
1 parent b79edf9 commit 0192614

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/source/API/SBModule.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,5 +677,9 @@ const char *SBModule::GetName() const {
677677
if (!m_opaque_sp) {
678678
return nullptr;
679679
}
680-
return m_opaque_sp->GetObjectName().AsCString();
680+
auto mod_name = m_opaque_sp->GetObjectName();
681+
if (!mod_name) {
682+
return nullptr;
683+
}
684+
return mod_name.AsCString();
681685
}

0 commit comments

Comments
 (0)