* tui/tui-data.c (tui_prev_win): Guard against NULL.
authorThiago Jung Bauermann <bauerman@br.ibm.com>
Tue, 13 Nov 2007 17:00:11 +0000 (17:00 +0000)
committerThiago Jung Bauermann <bauerman@br.ibm.com>
Tue, 13 Nov 2007 17:00:11 +0000 (17:00 +0000)
gdb/ChangeLog
gdb/tui/tui-data.c

index 6ddb075..83c5ba9 100644 (file)
@@ -1,3 +1,7 @@
+2007-11-13  Thiago Jung Bauermann  <bauerman@br.ibm.com>
+
+       * tui/tui-data.c (tui_prev_win): Guard against NULL.
+
 2007-11-12  Markus Deuling  <deuling@de.ibm.com>
 
        * gdbarch.sh (gdbarch_alloc): Replace current_gdbarch by gdbarch. Remove
index 190c687..6014dc5 100644 (file)
@@ -370,7 +370,8 @@ tui_prev_win (struct tui_win_info *cur_win)
     type = cur_win->generic.type - 1;
   while (type != cur_win->generic.type && (prev == NULL))
     {
-      if (tui_win_list[type]->generic.is_visible)
+      if (tui_win_list[type]
+         && tui_win_list[type]->generic.is_visible)
        prev = tui_win_list[type];
       else
        {