emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113576: Fix bug #14970 with crashes when deleting m


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r113576: Fix bug #14970 with crashes when deleting many frames on MS-Windows.
Date: Sun, 28 Jul 2013 15:23:16 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113576
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14970
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2013-07-28 18:22:27 +0300
message:
  Fix bug #14970 with crashes when deleting many frames on MS-Windows.
  
   src/w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
   frame which got the message is still alive, before dereferencing
   its pointer.
   src/frame.c (delete_frame): Test "this" frame's minibuffer window to
   be a live window, before using it as such.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/frame.c                    frame.c-20091113204419-o5vbwnq5f7feedwu-243
  src/w32fns.c                   w32fns.c-20091113204419-o5vbwnq5f7feedwu-945
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-07-27 13:08:03 +0000
+++ b/src/ChangeLog     2013-07-28 15:22:27 +0000
@@ -1,3 +1,12 @@
+2013-07-28  Eli Zaretskii  <address@hidden>
+
+       * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
+       frame which got the message is still alive, before dereferencing
+       its pointer.  (Bug#14970)
+
+       * frame.c (delete_frame): Test "this" frame's minibuffer window to
+       be a live window, before using it as such.  (Bug#14970)
+
 2013-07-27  Eli Zaretskii  <address@hidden>
 
        * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call

=== modified file 'src/frame.c'
--- a/src/frame.c       2013-07-16 14:52:22 +0000
+++ b/src/frame.c       2013-07-28 15:22:27 +0000
@@ -1157,10 +1157,13 @@
 
       FOR_EACH_FRAME (frames, this)
        {
+         Lisp_Object fminiw;
+         struct frame *this_f;
+
          if (! EQ (this, frame)
-             && EQ (frame,
-                    WINDOW_FRAME (XWINDOW
-                                  (FRAME_MINIBUF_WINDOW (XFRAME (this))))))
+             && (this_f = XFRAME (this))
+             && WINDOWP (fminiw = FRAME_MINIBUF_WINDOW (this_f))
+             && EQ (frame, WINDOW_FRAME (XWINDOW (fminiw))))
            {
              /* If we MUST delete this frame, delete the other first.
                 But do this only if FORCE equals `noelisp'.  */

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2013-07-19 01:24:35 +0000
+++ b/src/w32fns.c      2013-07-28 15:22:27 +0000
@@ -3213,6 +3213,8 @@
             described by W was deleted, as indicated by its buffer
             field being reset to nil.  */
          f = x_window_to_frame (dpyinfo, hwnd);
+         if (!(f && FRAME_LIVE_P (f)))
+           break;
          w = XWINDOW (FRAME_SELECTED_WINDOW (f));
          /* Punt if someone changed the frame's selected window
             behind our back. */


reply via email to

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