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
128d4995ee
commit
74e37edc35
@ -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