progbar PoC: check hbar_make() result #1348

This commit is contained in:
nick black 2021-02-15 05:05:18 -05:00
parent 07dd9dddde
commit 5facfbd78a
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -136,12 +136,20 @@ int main(void){
ncprogbar_destroy(ncp);
ncplane_erase(notcurses_stdplane(nc));
ncp = hbar_make(nc, NCPROGBAR_OPTION_RETROGRADE);
if(ncp == NULL){
notcurses_stop(nc);
return EXIT_FAILURE;
}
if(pbar_fill(nc, ncp)){
notcurses_stop(nc);
return EXIT_FAILURE;
}
ncprogbar_destroy(ncp);
ncp = hbar_make(nc, 0);
if(ncp == NULL){
notcurses_stop(nc);
return EXIT_FAILURE;
}
if(pbar_fill(nc, ncp)){
notcurses_stop(nc);
return EXIT_FAILURE;