This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PING: PATCH: PR tui/14486: resize crashes tui
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GDB <gdb-patches at sourceware dot org>
- Date: Sun, 26 Aug 2012 08:25:43 -0700
- Subject: PING: PATCH: PR tui/14486: resize crashes tui
On Fri, Aug 17, 2012 at 1:33 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> This patch checks if TUI_SRC_WIN is not NULL before referencing it. OK
> to install?
>
> Thanks.
>
>
> H.J.
> ----
> 2010-08-17 H.J. Lu <hongjiu.lu@intel.com>
>
> PR tui/14486
> * tui/tui-source.c (tui_source_is_displayed): Check if TUI_SRC_WIN
> is not NULL before referencing it.
>
> 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,
PING.
--
H.J.