summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-22 08:46:53 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-22 08:46:53 +0000
commitf559052cc20a76989d3135eee39a4cefaa65a1d2 (patch)
treedece46a8806897b061303ae58d77d78093fe35f6 /Src
parent9cf4518c5754fe908dbea5e84656fd37656bb96d (diff)
downloadzsh-f559052cc20a76989d3135eee39a4cefaa65a1d2.tar.gz
zsh-f559052cc20a76989d3135eee39a4cefaa65a1d2.tar.xz
zsh-f559052cc20a76989d3135eee39a4cefaa65a1d2.zip
Rocky Bernstein: 25696: fix crash on empty history.
Diffstat (limited to 'Src')
-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;
 }
 
 /**/