BMessageValueNode wasn't taking into account the possibility that type

information was unavailable, leading to a crash when used without a debug
libbe being present.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42386 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2011-07-06 23:34:02 +00:00
parent 1e393751ba
commit 2a3c2964f1
1 changed files with 7 additions and 0 deletions

View File

@ -299,6 +299,13 @@ BMessageValueNode::CreateChildren()
Type* whatType = NULL;
CompoundType* messageType = dynamic_cast<CompoundType*>(fType);
if (messageType == NULL || messageType->CountDataMembers() == 0) {
if (fContainer != NULL)
fContainer->NotifyValueNodeChildrenCreated(this);
return B_OK;
}
for (int32 i = 0; i < messageType->CountDataMembers(); i++) {
member = messageType->DataMemberAt(i);
if (strcmp(member->Name(), "what") == 0) {