From 1cce3bf8c6fb9e619cf390e1d666cd5b3078f530 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 2 Jan 2016 18:02:45 -0800 Subject: [PATCH] Avoid crashing when we have no "current terminal". --- Console.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Console.cpp b/Console.cpp index 31a2dbb..344203f 100644 --- a/Console.cpp +++ b/Console.cpp @@ -635,8 +635,10 @@ static void Console(CYOptions &options) { rl_completer_word_break_characters = break_; rl_attempted_completion_function = &Complete; - rl_redisplay_function = CYDisplayUpdate; - rl_prep_term_function = CYConsolePrepTerm; + if (cur_term != NULL) { + rl_redisplay_function = CYDisplayUpdate; + rl_prep_term_function = CYConsolePrepTerm; + } struct sigaction action; sigemptyset(&action.sa_mask); -- 2.49.0