Hardening the vector iterator synthetic child(ren) provider against item-not-in-cluster asserts

llvm-svn: 178265
This commit is contained in:
Enrico Granata 2013-03-28 18:50:54 +00:00
parent db70b5295e
commit 6eca3559d6
1 changed files with 3 additions and 1 deletions

View File

@ -958,6 +958,8 @@ m_item_sp()
bool
lldb_private::formatters::VectorIteratorSyntheticFrontEnd::Update()
{
m_item_sp.reset();
ValueObjectSP valobj_sp = m_backend.GetSP();
if (!valobj_sp)
return false;
@ -975,7 +977,7 @@ lldb_private::formatters::VectorIteratorSyntheticFrontEnd::Update()
m_item_sp = ValueObject::CreateValueObjectFromAddress("item", item_ptr->GetValueAsUnsigned(0), m_exe_ctx_ref, ClangASTType(item_ptr->GetClangAST(),ClangASTType::GetPointeeType(item_ptr->GetClangType())));
if (err.Fail())
m_item_sp.reset();
return (m_item_sp.get() != NULL);
return false;
}
size_t