Clear links when making UI nodes
This commit is contained in:
@@ -283,15 +283,15 @@ static void pruneStale(BzUI *ui, BzUINode *node) {
|
||||
while (child != NULL) {
|
||||
if (child->lastFrame != node->lastFrame) {
|
||||
BzUINode *next = child->next;
|
||||
removeNode(ui, child);
|
||||
if (child->prev) {
|
||||
if (child->prev)
|
||||
child->prev->next = next;
|
||||
}
|
||||
removeNode(ui, child);
|
||||
if (next)
|
||||
next->prev = child;
|
||||
child = next;
|
||||
} else {
|
||||
if (!first) {
|
||||
if (!first)
|
||||
first = child;
|
||||
}
|
||||
pruneStale(ui, child);
|
||||
last = child;
|
||||
child = child->next;
|
||||
@@ -402,6 +402,8 @@ BzUINode *bzUINodeMake(BzUI *ui, BzUIKey key, const BzUINodeDesc *desc) {
|
||||
BzUINode *parent = bzArrayGet(ui->nodeStack, bzArraySize(ui->nodeStack) - 1);
|
||||
BZ_ASSERT(parent);
|
||||
|
||||
bzUINodeClearLinks(node);
|
||||
|
||||
if (parent->last) {
|
||||
parent->last->next = node;
|
||||
node->prev = parent->last;
|
||||
|
||||
Reference in New Issue
Block a user