Fixed null pointer dereference.
This commit is contained in:
parent
ee8563504d
commit
b920f9a081
@ -647,6 +647,9 @@ int WLog_AddChild(wLog* parent, wLog* child)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!parent->Children)
|
||||||
|
return -1;
|
||||||
|
|
||||||
parent->Children[parent->ChildrenCount++] = child;
|
parent->Children[parent->ChildrenCount++] = child;
|
||||||
child->Parent = parent;
|
child->Parent = parent;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user