]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/tui/tui-source.c
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / tui / tui-source.c
index 9ba9b1d0f0ef3870f463d2e619d78dc90566cb4a..eb7879c268c6e8d38b1889746757ed051bdb6685 100644 (file)
@@ -1,6 +1,6 @@
 /* TUI display source window.
 
-   Copyright (C) 1998-2004, 2007-2012 Free Software Foundation, Inc.
+   Copyright (C) 1998-2013 Free Software Foundation, Inc.
 
    Contributed by Hewlett-Packard Company.
 
@@ -46,7 +46,7 @@ tui_set_source_content (struct symtab *s,
 {
   enum tui_status ret = TUI_FAILURE;
 
-  if (s != (struct symtab *) NULL && s->filename != (char *) NULL)
+  if (s != (struct symtab *) NULL)
     {
       FILE *stream;
       int i, desc, c, line_width, nlines;
@@ -334,7 +334,8 @@ tui_show_symtab_source (struct gdbarch *gdbarch, struct symtab *s,
 int
 tui_source_is_displayed (char *fname)
 {
-  return (TUI_SRC_WIN->generic.content_in_use 
+  return (TUI_SRC_WIN != NULL
+         && TUI_SRC_WIN->generic.content_in_use 
          && (filename_cmp (((struct tui_win_element *)
                             (tui_locator_win_info_ptr ())->
                             content[0])->which_element.locator.file_name,