1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255891

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