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:
Xin LI 2013-09-26 17:54:58 +00:00
parent 6a77884d08
commit 7a087fd50a

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