Fix crash when debug information wasn't available.
This commit is contained in:
@@ -223,11 +223,17 @@ BListValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
|
|||||||
if (baseType->CountTemplateParameters() != 0) {
|
if (baseType->CountTemplateParameters() != 0) {
|
||||||
// for BObjectList we need to walk up
|
// for BObjectList we need to walk up
|
||||||
// the hierarchy: BObjectList -> _PointerList_ -> BList
|
// the hierarchy: BObjectList -> _PointerList_ -> BList
|
||||||
|
if (baseType->CountBaseTypes() == 0)
|
||||||
|
return B_BAD_DATA;
|
||||||
|
|
||||||
baseType = dynamic_cast<CompoundType*>(baseType->BaseTypeAt(0)
|
baseType = dynamic_cast<CompoundType*>(baseType->BaseTypeAt(0)
|
||||||
->GetType());
|
->GetType());
|
||||||
if (baseType == NULL || baseType->Name() != "_PointerList_")
|
if (baseType == NULL || baseType->Name() != "_PointerList_")
|
||||||
return B_BAD_DATA;
|
return B_BAD_DATA;
|
||||||
|
|
||||||
|
if (baseType->CountBaseTypes() == 0)
|
||||||
|
return B_BAD_DATA;
|
||||||
|
|
||||||
baseType = dynamic_cast<CompoundType*>(baseType->BaseTypeAt(0)
|
baseType = dynamic_cast<CompoundType*>(baseType->BaseTypeAt(0)
|
||||||
->GetType());
|
->GetType());
|
||||||
if (baseType == NULL || baseType->Name() != "BList")
|
if (baseType == NULL || baseType->Name() != "BList")
|
||||||
@@ -303,14 +309,16 @@ BListValueNode::CreateChildren()
|
|||||||
if (fChildrenCreated)
|
if (fChildrenCreated)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
BListItemCountNodeChild* countChild = new(std::nothrow)
|
if (fItemCountType != NULL) {
|
||||||
BListItemCountNodeChild(fItemCountLocation, this, fItemCountType);
|
BListItemCountNodeChild* countChild = new(std::nothrow)
|
||||||
|
BListItemCountNodeChild(fItemCountLocation, this, fItemCountType);
|
||||||
|
|
||||||
if (countChild == NULL)
|
if (countChild == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
countChild->SetContainer(fContainer);
|
countChild->SetContainer(fContainer);
|
||||||
fChildren.AddItem(countChild);
|
fChildren.AddItem(countChild);
|
||||||
|
}
|
||||||
|
|
||||||
BReference<Type> addressTypeRef;
|
BReference<Type> addressTypeRef;
|
||||||
Type* type = NULL;
|
Type* type = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user