From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21155 invoked by alias); 20 Aug 2012 13:30:06 -0000 Received: (qmail 21007 invoked by uid 22791); 20 Aug 2012 13:30:03 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Aug 2012 13:29:50 +0000 Received: by vbkv13 with SMTP id v13so6171876vbk.0 for ; Mon, 20 Aug 2012 06:29:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.154.148 with SMTP id o20mr10321648vcw.18.1345469389208; Mon, 20 Aug 2012 06:29:49 -0700 (PDT) Received: by 10.58.234.39 with HTTP; Mon, 20 Aug 2012 06:29:49 -0700 (PDT) In-Reply-To: References: <20120817203303.GA16406@intel.com> Date: Mon, 20 Aug 2012 13:30:00 -0000 Message-ID: Subject: Re: PATCH: PR tui/14486: resize crashes tui From: "H.J. Lu" To: "Abid, Hafiz" Cc: GDB Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00539.txt.bz2 On Mon, Aug 20, 2012 at 3:36 AM, Abid, Hafiz wrote: > You may want to look at the following thread. It seems to be fixing a related problem. > > http://sourceware.org/ml/gdb-patches/2012-08/msg00349.html > I think it is the same problem. > Regards, > Abid > >> -----Original Message----- >> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- >> owner@sourceware.org] On Behalf Of H.J. Lu >> Sent: Friday, August 17, 2012 9:33 PM >> To: GDB >> Subject: PATCH: PR tui/14486: resize crashes tui >> >> 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 >> >> 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, -- H.J.