diff options
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/tui/tui-io.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e239221..1c4ccaf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-07-24 Pedro Alves <palves@redhat.com> + + * tui/tui-io.c (tui_prep_terminal): Handle NULL rl_prompt. + 2014-07-24 Tom Tromey <tromey@redhat.com> Gary Benson <gbenson@redhat.com> diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index dcccb08..75eb4b8 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -293,7 +293,7 @@ tui_prep_terminal (int notused1) (we can't use gdb_prompt() due to secondary prompts and can't use rl_prompt because it points to an alloca buffer). */ xfree (tui_rl_saved_prompt); - tui_rl_saved_prompt = xstrdup (rl_prompt); + tui_rl_saved_prompt = rl_prompt != NULL ? xstrdup (rl_prompt) : NULL; } /* Readline callback to restore the terminal. It is called once each |