Fix crash when debug information wasn't available.

This commit is contained in:
Rene Gollent 2012-12-04 21:22:11 -05:00
parent 860c710c4b
commit b060c28e65

View File

@ -223,11 +223,17 @@ BListValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
if (baseType->CountTemplateParameters() != 0) {
// for BObjectList we need to walk up
// the hierarchy: BObjectList -> _PointerList_ -> BList
if (baseType->CountBaseTypes() == 0)
return B_BAD_DATA;
baseType = dynamic_cast<CompoundType*>(baseType->BaseTypeAt(0)
->GetType());
if (baseType == NULL || baseType->Name() != "_PointerList_")
return B_BAD_DATA;
if (baseType->CountBaseTypes() == 0)
return B_BAD_DATA;
baseType = dynamic_cast<CompoundType*>(baseType->BaseTypeAt(0)
->GetType());
if (baseType == NULL || baseType->Name() != "BList")
@ -303,6 +309,7 @@ BListValueNode::CreateChildren()
if (fChildrenCreated)
return B_OK;
if (fItemCountType != NULL) {
BListItemCountNodeChild* countChild = new(std::nothrow)
BListItemCountNodeChild(fItemCountLocation, this, fItemCountType);
@ -311,6 +318,7 @@ BListValueNode::CreateChildren()
countChild->SetContainer(fContainer);
fChildren.AddItem(countChild);
}
BReference<Type> addressTypeRef;
Type* type = NULL;