[lldb/Symbol] Fix null-deref in TypeList::Dump
This patch should just a crash caused by a null pointer dereferencing when dumping a type. It makes sure that the pointer is valid. rdar://97455134 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
parent
edc77353da
commit
6c58f12d07
|
@ -92,9 +92,9 @@ void TypeList::ForEach(
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypeList::Dump(Stream *s, bool show_context) {
|
void TypeList::Dump(Stream *s, bool show_context) {
|
||||||
for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos) {
|
for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
|
||||||
pos->get()->Dump(s, show_context);
|
if (Type *t = pos->get())
|
||||||
}
|
t->Dump(s, show_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypeList::RemoveMismatchedTypes(llvm::StringRef qualified_typename,
|
void TypeList::RemoveMismatchedTypes(llvm::StringRef qualified_typename,
|
||||||
|
|
Loading…
Reference in New Issue