reparenting to NULL gets standard plane #982

This commit is contained in:
nick black 2020-08-31 17:58:28 -04:00
parent f6c2334521
commit ae63ad15bd
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -2005,6 +2005,9 @@ ncplane* ncplane_reparent(ncplane* n, ncplane* newparent){
if(n == n->nc->stdplane){
return NULL; // can't reparent standard plane
}
if(newparent == NULL){
newparent = n->nc->stdplane;
}
if(n->boundto == newparent){
return n;
}