]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/comp_parse.c
ncurses 6.2 - patch 20210508
[ncurses.git] / ncurses / tinfo / comp_parse.c
index e47625b3dbe1735ff8cd2044bd804d6202ad9a1d..2bc9485342742708c0452ea90076b9a83837a189 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <tic.h>
 
-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;
                        }