aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorEli Zaretskii2013-07-28 18:22:27 +0300
committerEli Zaretskii2013-07-28 18:22:27 +0300
commit2e5ce5ded73aa084e12b826fd1adbebd03f900fd (patch)
tree78668c3c8e48cca16e57b6005c45543ae5b6b80f /src/frame.c
parent0f91f03c05dd9be6dbcb7eecd784ccaf0fc7a24b (diff)
downloademacs-2e5ce5ded73aa084e12b826fd1adbebd03f900fd.tar.gz
emacs-2e5ce5ded73aa084e12b826fd1adbebd03f900fd.zip
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.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c
index 5fa54052cd2..0b59b43a445 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1157,10 +1157,13 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1157 1157
1158 FOR_EACH_FRAME (frames, this) 1158 FOR_EACH_FRAME (frames, this)
1159 { 1159 {
1160 Lisp_Object fminiw;
1161 struct frame *this_f;
1162
1160 if (! EQ (this, frame) 1163 if (! EQ (this, frame)
1161 && EQ (frame, 1164 && (this_f = XFRAME (this))
1162 WINDOW_FRAME (XWINDOW 1165 && WINDOWP (fminiw = FRAME_MINIBUF_WINDOW (this_f))
1163 (FRAME_MINIBUF_WINDOW (XFRAME (this)))))) 1166 && EQ (frame, WINDOW_FRAME (XWINDOW (fminiw))))
1164 { 1167 {
1165 /* If we MUST delete this frame, delete the other first. 1168 /* If we MUST delete this frame, delete the other first.
1166 But do this only if FORCE equals `noelisp'. */ 1169 But do this only if FORCE equals `noelisp'. */