From 9d770af5f4797d28cc2d44559f2ed77a11c602de Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 20 Apr 2006 09:42:11 +1000 Subject: [PATCH] Earlier history in non-interactive mode bugfix contained a new bug causing fish to crash if read is not used in non-interactive mode darcs-hash:20060419234211-ac50b-886a33e96cb3f95e9b2c632f03eb3b2b20a560fd.gz --- history.c | 4 ++++ main.c | 1 + 2 files changed, 5 insertions(+) diff --git a/history.c b/history.c index 49e51b106..daf1a18f8 100644 --- a/history.c +++ b/history.c @@ -202,6 +202,10 @@ static void history_to_hash() { history_data *d; + if( !history_last ) + return; + + d = (history_data *)hash_get( &history_table, mode_name ); diff --git a/main.c b/main.c index 47355208e..d24263085 100644 --- a/main.c +++ b/main.c @@ -61,6 +61,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "output.h" #include "translate.h" #include "halloc_util.h" +#include "history.h" /**