From c0ea4d62c81f7480192b1f61649f82d064dcb716 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 28 Aug 2001 08:41:51 +0000 Subject: handle possible NULL pointer returned from bufferwords() (15717) --- Src/Modules/parameter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/Modules') diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index fe44eafb3..23c868598 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -1105,9 +1105,9 @@ histwgetfn(Param pm) int i = addhistnum(curhist, -1, HIST_FOREIGN), iw; Histent he = gethistent(i, GETHIST_UPWARD); - ll = bufferwords(NULL, NULL, NULL); - for (n = firstnode(ll); n; incnode(n)) - pushnode(l, getdata(n)); + if ((ll = bufferwords(NULL, NULL, NULL))) + for (n = firstnode(ll); n; incnode(n)) + pushnode(l, getdata(n)); while (he) { for (iw = he->nwords - 1; iw >= 0; iw--) { -- cgit 1.4.1