emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem report #33 RESOLVED


From: Jan Djärv
Subject: Re: Problem report #33 RESOLVED
Date: Tue, 16 May 2006 08:16:05 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060501)




What about the x_window_to_frame call in relation to Ghostview?
If it can return NULL, emacs will crash...


It can return NULL if the window has been removed (i.e. it is a race problem). Probably not that common in real life, but I think you should check in your fix.

        Jan D.


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;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]