From 5facfbd78aba36cec21d67c7f4938afaeb5c5095 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 15 Feb 2021 05:05:18 -0500 Subject: [PATCH] progbar PoC: check hbar_make() result #1348 --- src/poc/progbar.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/poc/progbar.c b/src/poc/progbar.c index a9af5f2e7..e59801616 100644 --- a/src/poc/progbar.c +++ b/src/poc/progbar.c @@ -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;