From f559052cc20a76989d3135eee39a4cefaa65a1d2 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 22 Sep 2008 08:46:53 +0000 Subject: Rocky Bernstein: 25696: fix crash on empty history. --- Src/hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/hist.c') 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; } /**/ -- cgit 1.4.1