about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 55131f06e..65812dc91 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -945,7 +945,7 @@ movehistent(Histent he, int n, int xflags)
 mod_export Histent
 up_histent(Histent he)
 {
-    return he->up == hist_ring? NULL : he->up;
+    return !he || he->up == hist_ring? NULL : he->up;
 }
 
 /**/