From 77146ae7cb6f6a5c7b081c93476ba9918d9a08c5 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 24 Jul 2006 06:55:26 +0000 Subject: [PATCH] * ext/readline/readline.c (readline_readline): rl_deprep_term_function may be NULL with libedit. reported by Ryan Davis. [ruby-dev:29070] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/readline/readline.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a3aef2ecae..1cb0071d72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 24 15:51:52 2006 Tanaka Akira + + * ext/readline/readline.c (readline_readline): rl_deprep_term_function + may be NULL with libedit. reported by Ryan Davis. [ruby-dev:29070] + Sun Jul 23 22:59:49 2006 Tanaka Akira * test/socket/test_unix.rb: disabled on cygwin. diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 626c0e0dc7..f6dc6b67ed 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -77,7 +77,9 @@ readline_readline(int argc, VALUE *argv, VALUE self) rl_cleanup_after_signal(); #elif defined HAVE_RL_DEPREP_TERM_FUNCTION /* restore terminal mode */ - (*rl_deprep_term_function)(); + if (rl_deprep_term_function != NULL) /* NULL in libedit. [ruby-dev:29116] */ + (*rl_deprep_term_function)(); + else #else rl_deprep_terminal(); #endif