From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Problem report #33 RESOLVED Date: Mon, 15 May 2006 23:46:52 +0200 Message-ID: References: <200605140438.k4E4c6Mu002995@scanner2.ics.uci.edu> <44671504.9010808@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147729743 5173 80.91.229.2 (15 May 2006 21:49:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 May 2006 21:49:03 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 15 23:49:00 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ffkvt-0002V6-TZ for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 23:48:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ffkvt-0006PL-3j for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 17:48:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ffkvd-0006Mm-05 for emacs-devel@gnu.org; Mon, 15 May 2006 17:48:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfkvX-0006E5-Qw for emacs-devel@gnu.org; Mon, 15 May 2006 17:48:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfkvX-0006Dx-La for emacs-devel@gnu.org; Mon, 15 May 2006 17:48:31 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ffky1-000191-VB for emacs-devel@gnu.org; Mon, 15 May 2006 17:51:06 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 30634FAC029; Mon, 15 May 2006 23:48:27 +0200 (CEST) Original-To: "Jan D." In-Reply-To: <44671504.9010808@swipnet.se> (Jan D.'s message of "Sun, 14 May 2006 13:31:16 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54541 Archived-At: "Jan D." writes: > Dan Nicolaescu wrote: >> This one reappeared after the last xterm.c checkin. >> Is it OK not to check f for NULL here? >> > > No it is not OK. If someone tries to get the widget tree with editres > on an Emacs lucid dialog for example, Emacs will crash. I've checked > in a fix. What about the x_window_to_frame call in relation to Ghostview? If it can return NULL, emacs will crash... Index: xterm.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/xterm.c,v retrieving revision 1.912 diff -c -r1.912 xterm.c *** xterm.c 14 May 2006 11:26:07 -0000 1.912 --- xterm.c 15 May 2006 21:43:13 -0000 *************** *** 5821,5826 **** --- 5821,5828 ---- images, only, which should have 1 page. */ Pixmap pixmap = (Pixmap) event.xclient.data.l[1]; f = x_window_to_frame (dpyinfo, event.xclient.window); + if (!f) + goto OTHER; x_kill_gs_process (pixmap, f); expose_frame (f, 0, 0, 0, 0); goto done; -- Kim F. Storm http://www.cua.dk