diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-08-27 17:00:42 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-08-27 17:00:42 +0000 |
commit | f629cd75725e5f99966e39af06178aad4787445b (patch) | |
tree | 54cffc2d9206b92210a521e67e72e28e5ff76554 /gdb/tui | |
parent | 1c8cdcb14fe619a64accf1cc11d5d7009d76c748 (diff) | |
download | gdb-f629cd75725e5f99966e39af06178aad4787445b.zip gdb-f629cd75725e5f99966e39af06178aad4787445b.tar.gz gdb-f629cd75725e5f99966e39af06178aad4787445b.tar.bz2 |
Check if TUI_SRC_WIN is not NULL before referencing it
PR tui/14486
* tui/tui-source.c (tui_source_is_displayed): Check if TUI_SRC_WIN
is not NULL before referencing it.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-source.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 9ba9b1d..030653c 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -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, |