X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_parse.c;h=2bc9485342742708c0452ea90076b9a83837a189;hp=e47625b3dbe1735ff8cd2044bd804d6202ad9a1d;hb=214f159cd8c0ea4fba47beb249379d0da2dfb8ca;hpb=3934889cc6b0f45cf218c88df7f35634d250c9e5 diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index e47625b3..2bc94853 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: comp_parse.c,v 1.112 2021/02/27 21:01:21 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.113 2021/05/08 15:03:42 tom Exp $") static void sanity_check2(TERMTYPE2 *, bool); NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; @@ -457,8 +457,9 @@ _nc_resolve_uses2(bool fullresolve, bool literal) /* verify that there are no earlier uses */ for (j = 0; j < i; ++j) { - if (!strcmp(qp->uses[j].link->tterm.term_names, - rp->tterm.term_names)) { + if (qp->uses[j].link != NULL + && !strcmp(qp->uses[j].link->tterm.term_names, + rp->tterm.term_names)) { _nc_warning("duplicate use=%s", lookfor); break; } @@ -487,8 +488,9 @@ _nc_resolve_uses2(bool fullresolve, bool literal) /* verify that there are no earlier uses */ for (j = 0; j < i; ++j) { - if (!strcmp(qp->uses[j].link->tterm.term_names, - rp->tterm.term_names)) { + if (qp->uses[j].link != NULL + && !strcmp(qp->uses[j].link->tterm.term_names, + rp->tterm.term_names)) { _nc_warning("duplicate use=%s", lookfor); break; }