Import NetBSD readline.c,v 1.104: do not crash with add_history(NULL).
MFC after: 3 days Approved by: re (gjb)
This commit is contained in:
parent
6a77884d08
commit
7a087fd50a
@ -1363,6 +1363,9 @@ add_history(const char *line)
|
||||
TYPE(HistEvent) ev;
|
||||
const Char *wline;
|
||||
|
||||
if (line == NULL)
|
||||
return 0;
|
||||
|
||||
if (h == NULL || e == NULL)
|
||||
rl_initialize();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user