mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
demo: fpsgraph_init: ncuplot_create() kills plane on error
This commit is contained in:
parent
74eac6236b
commit
1f1bbadeac
@ -667,9 +667,9 @@ int fpsgraph_init(struct notcurses* nc){
|
||||
ncchannels_set_fg_rgb8(&opts.maxchannels, 0x80, 0xff, 0x80);
|
||||
ncchannels_set_bg_rgb(&opts.maxchannels, 0x201020);
|
||||
ncchannels_set_bg_alpha(&opts.maxchannels, CELL_ALPHA_BLEND);
|
||||
// takes ownership of newp on all paths
|
||||
struct ncuplot* fpsplot = ncuplot_create(newp, &opts, 0, 0);
|
||||
if(!fpsplot){
|
||||
ncplane_destroy(newp);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
plot = fpsplot;
|
||||
|
Loading…
x
Reference in New Issue
Block a user