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:
delphij 2013-09-26 17:54:58 +00:00
parent 128d4995ee
commit 74e37edc35

View File

@ -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();