]> git.saurik.com Git - cycript.git/commitdiff
Avoid crashing when we have no "current terminal".
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jan 2016 02:02:45 +0000 (18:02 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jan 2016 02:02:45 +0000 (18:02 -0800)
Console.cpp

index 31a2dbbc6fc4eb348b7862dbabf786979c34d965..344203f9f3a6bbb2756589c6957578d17083a0e8 100644 (file)
@@ -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);