diff --git a/src/core.c b/src/core.c index 1bb03a9..1307e14 100644 --- a/src/core.c +++ b/src/core.c @@ -1018,9 +1018,11 @@ void MwReparent(MwWidget handle, MwWidget new_parent) { } handle->parent = new_parent; - arrput(new_parent->children, handle); + if(new_parent != NULL) { + arrput(new_parent->children, handle); - MwDispatch(handle->parent, children_update); + MwDispatch(handle->parent, children_update); + } MwForceRender(handle); }