prevent crash

bug-395 reported by Bohdan Tkhir
This commit is contained in:
Holger Vogt 2019-03-02 21:07:26 +01:00
parent 7bb8049d2a
commit 3494e6b390
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ com_display(wordlist *wl)
tfree(s); /*DG to avoid the cp_unquote memory leak */
if (d == NULL)
fprintf(cp_err, "Error: no such vector as %s.\n", wl->wl_word);
else if (d->v_plot == NULL)
fprintf(cp_err, "Error: no analog vector as %s.\n", wl->wl_word);
else
while (d) {
pvec(d);