Tidy tui_delete_win
[deliverable/binutils-gdb.git] / gdb / tui / tui-interp.c
index aa5e328ded2b6e3f179bf90d7373ae3943ebaf57..d1146fed0e6985e70359247ba6a2ed2a6107a628 100644 (file)
@@ -1,6 +1,6 @@
 /* TUI Interpreter definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,6 +33,8 @@
 #include "infrun.h"
 #include "observable.h"
 #include "gdbthread.h"
+#include "inferior.h"
+#include "main.h"
 
 /* Set to 1 when the TUI mode must be activated when we first start
    gdb.  */
@@ -209,13 +211,11 @@ tui_on_command_error (void)
 static void
 tui_on_user_selected_context_changed (user_selected_what selection)
 {
-  struct thread_info *tp;
-
   /* This event is suppressed.  */
   if (cli_suppress_notification.user_selected_context)
     return;
 
-  tp = find_thread_ptid (inferior_ptid);
+  thread_info *tp = inferior_ptid != null_ptid ? inferior_thread () : NULL;
 
   SWITCH_THRU_ALL_UIS ()
     {
This page took 0.025631 seconds and 4 git commands to generate.