[nctree_create] check for NULL ncplane

This commit is contained in:
nick black 2021-03-22 05:58:37 -04:00
parent 4fa0857311
commit 57f8dc4390
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -123,6 +123,9 @@ nctree_inner_create(ncplane* n, const struct nctree_options* opts){
}
nctree* nctree_create(ncplane* n, const struct nctree_options* opts){
if(n == NULL){
return -1;
}
notcurses* nc = ncplane_notcurses(n);
if(opts->flags){
logwarn(nc, "Passed invalid flags 0x%016jx\n", (uint64_t)opts->flags);