mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
[nctabbed] NULL guards around trivalent nctabbed_channels()
This commit is contained in:
parent
c677a4fd8a
commit
37a12e4273
@ -364,9 +364,15 @@ nctab* nctabbed_select(nctabbed* nt, nctab* t){
|
||||
|
||||
void nctabbed_channels(nctabbed* nt, uint64_t* RESTRICT hdrchan,
|
||||
uint64_t* RESTRICT selchan, uint64_t* RESTRICT sepchan){
|
||||
memcpy(&nt->opts.hdrchan, hdrchan, sizeof(*hdrchan));
|
||||
memcpy(&nt->opts.selchan, selchan, sizeof(*selchan));
|
||||
memcpy(&nt->opts.sepchan, sepchan, sizeof(*sepchan));
|
||||
if(hdrchan){
|
||||
memcpy(&nt->opts.hdrchan, hdrchan, sizeof(*hdrchan));
|
||||
}
|
||||
if(selchan){
|
||||
memcpy(&nt->opts.selchan, selchan, sizeof(*selchan));
|
||||
}
|
||||
if(sepchan){
|
||||
memcpy(&nt->opts.sepchan, sepchan, sizeof(*sepchan));
|
||||
}
|
||||
}
|
||||
|
||||
const char* nctabbed_separator(nctabbed* nt){
|
||||
|
Loading…
Reference in New Issue
Block a user