Fix crash when exiting TUI with gdb -tui
[deliverable/binutils-gdb.git] / gdb / tui / tui-io.c
index e7a8ac77bce8729a4cdf10e919e45a5b4efa0c86..277b560af4f4cdaa4229a7cd575332b32e004967 100644 (file)
@@ -746,6 +746,10 @@ tui_setup_io (int mode)
 
   if (mode)
     {
+      /* Ensure that readline has been initialized before saving any
+        of its variables.  */
+      tui_ensure_readline_initialized ();
+
       /* Redirect readline to TUI.  */
       tui_old_rl_redisplay_function = rl_redisplay_function;
       tui_old_rl_deprep_terminal = rl_deprep_term_function;
This page took 0.023097 seconds and 4 git commands to generate.