Skip to content

Commit 5e60c0a

Browse files
authored
Merge pull request #5141 from medismailben/stable/20220421
[lldb/Symbol] Fix null-deref in TypeList::Dump
2 parents 8abf6a9 + 564b8a7 commit 5e60c0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Symbol/TypeList.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ void TypeList::ForEach(
9292
}
9393

9494
void TypeList::Dump(Stream *s, bool show_context) {
95-
for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos) {
96-
pos->get()->Dump(s, show_context);
97-
}
95+
for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
96+
if (Type *t = pos->get())
97+
t->Dump(s, show_context);
9898
}
9999

100100
void TypeList::RemoveMismatchedTypes(const char *qualified_typename,

0 commit comments

Comments
 (0)