From: Jay Freeman (saurik) Date: Sun, 3 Jan 2016 02:02:45 +0000 (-0800) Subject: Avoid crashing when we have no "current terminal". X-Git-Tag: v0.9.590~93 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/1cce3bf8c6fb9e619cf390e1d666cd5b3078f530?ds=sidebyside Avoid crashing when we have no "current terminal". --- 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);