* ada-lang.c (field_alignment): Guard against NULL.
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.c
index 37b70a1693a75352fb5cc7ff40516b92749f0184..5995af0d2b021e7700ef013232f42d655a096962 100644 (file)
@@ -1,7 +1,7 @@
 /* TUI layout window management.
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
-   Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
+   Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -139,7 +139,6 @@ tui_set_layout (enum tui_layout_type layout_type,
       enum tui_layout_type cur_layout = tui_current_layout (), new_layout = UNDEFINED_LAYOUT;
       int regs_populate = FALSE;
       CORE_ADDR addr = extract_display_start_addr ();
-      struct tui_win_info * new_win_with_focus = (struct tui_win_info *) NULL;
       struct tui_win_info * win_with_focus = tui_win_with_focus ();
       struct tui_layout_def * layout_def = tui_layout_def ();
 
@@ -234,10 +233,8 @@ tui_set_layout (enum tui_layout_type layout_type,
                      break;
                    }
                }
-             if (new_win_with_focus != (struct tui_win_info *) NULL)
-               tui_set_win_focus_to (new_win_with_focus);
              /*
-                ** Now update the window content
+              * Now update the window content.
               */
              if (!regs_populate &&
                  (new_layout == SRC_DATA_COMMAND ||
@@ -494,10 +491,10 @@ tui_set_layout_for_display_command (const char *layout_name)
            new_layout = prev_layout ();
          else
            status = TUI_FAILURE;
-         xfree (buf_ptr);
 
          tui_set_layout (new_layout, dpy_type);
        }
+      xfree (buf_ptr);
     }
   else
     status = TUI_FAILURE;
This page took 0.024054 seconds and 4 git commands to generate.