summaryrefslogtreecommitdiff
path: root/Src/Modules/parameter.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/parameter.c')
-rw-r--r--Src/Modules/parameter.c6
1 files changed, 3 insertions, 3 deletions
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--) {