From e3bb32f6084c2c885a0520e1415d40f66ac52cbd Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 13 Apr 2015 14:05:07 -0400 Subject: [PATCH] Fixed some code in stack.c. --- new/stack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/new/stack.c b/new/stack.c index 41a67d6..748759c 100644 --- a/new/stack.c +++ b/new/stack.c @@ -360,11 +360,11 @@ void uiStackAdd(uiControl *st, uiControl *c, int stretchy) } s->controls[s->len].c = c; s->controls[s->len].stretchy = stretchy; - if (s->parent != 0) - uiControlSetParent(s->controls[s->len].c, s->parent); s->len++; - if (s->parent != NULL) + if (s->parent != NULL) { + uiControlSetParent(s->controls[s->len].c, s->parent); uiParentUpdate(s->parent); + } } void uiStackRemove(uiControl *st, uintptr_t index)