From: Chong Yidong Date: Thu, 19 Jul 2012 03:33:08 +0000 (+0800) Subject: Avoid two crashes involving windows on dead frames. X-Git-Tag: emacs-24.2~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=23dc774492e25ee2191ffa4ee966216649dddbc1;p=emacs.git Avoid two crashes involving windows on dead frames. * window.c (Fwindow_absolute_pixel_edges) (Fdelete_other_windows_internal): Signal an error if the window is on a dead frame. Fixes: debbugs:11984 --- diff --git a/src/ChangeLog b/src/ChangeLog index 716ebbadab6..8ad531db846 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-07-19 Chong Yidong + + * window.c (Fwindow_absolute_pixel_edges) + (Fdelete_other_windows_internal): Signal an error if the window is + on a dead frame (Bug#11984). + 2012-07-14 Eli Zaretskii Remove FILE_SYSTEM_CASE. diff --git a/src/window.c b/src/window.c index f93f58f9b72..ae8d209df74 100644 --- a/src/window.c +++ b/src/window.c @@ -484,9 +484,7 @@ for future use. */) (Lisp_Object window, Lisp_Object limit) { register struct window *w = decode_any_window (window); - w->combination_limit = limit; - return w->combination_limit; } @@ -800,6 +798,8 @@ of just the text area, use `window-inside-absolute-pixel-edges'. */) { register struct window *w = decode_any_window (window); int add_x, add_y; + + CHECK_LIVE_FRAME (w->frame); calc_absolute_offset (w, &add_x, &add_y); return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), @@ -2568,6 +2568,7 @@ window-start value is reasonable when this function is called. */) Mouse_HLInfo *hlinfo; w = decode_any_window (window); + CHECK_LIVE_FRAME (w->frame); XSETWINDOW (window, w); f = XFRAME (w->frame); @@ -2581,6 +2582,7 @@ window-start value is reasonable when this function is called. */) /* ROOT must be an ancestor of WINDOW. */ { r = decode_any_window (root); + CHECK_LIVE_FRAME (r->frame); pwindow = XWINDOW (window)->parent; while (!NILP (pwindow)) if (EQ (pwindow, root))