equal
deleted
inserted
replaced
|
1 --- a/src/cmd/ksh93/sh/init.c 2013-01-28 01:37:27.339300867 -0800 |
|
2 +++ b/src/cmd/ksh93/sh/init.c 2013-01-28 01:39:31.614342117 -0800 |
|
3 @@ -278,8 +278,11 @@ |
|
4 static void put_history(register Namval_t* np,const char *val,int flags,Namfun_t *fp) |
|
5 { |
|
6 Shell_t *shp = nv_shell(np); |
|
7 - void *histopen = shp->gd->hist_ptr; |
|
8 + void *histopen = NULL; |
|
9 char *cp; |
|
10 + if( shp ) { |
|
11 + histopen = shp->gd->hist_ptr; |
|
12 + } |
|
13 if(val && histopen) |
|
14 { |
|
15 if(np==HISTFILE && (cp=nv_getval(np)) && strcmp(val,cp)==0) |