[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem report #33 RESOLVED
From: |
Kim F. Storm |
Subject: |
Re: Problem report #33 RESOLVED |
Date: |
Mon, 15 May 2006 23:46:52 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Jan D." <address@hidden> 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 <address@hidden> http://www.cua.dk