From: Chong Yidong Date: Sat, 21 Jul 2012 06:17:30 +0000 (+0800) Subject: Disallow windows on dead frames in decode_any_window. X-Git-Tag: emacs-24.2.90~1115 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e5d1c12ff599a1c42cf6f72fd22c2b000d67d6d;p=emacs.git Disallow windows on dead frames in decode_any_window. * window.c (decode_any_window): Signal an error if the window is on a dead frame. Fixes: debbugs:11984 --- diff --git a/src/ChangeLog b/src/ChangeLog index e90e48ee9dc..e5a0736cddc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-07-21 Chong Yidong + + * window.c (decode_any_window): Signal an error if the window is + on a dead frame (Bug#11984). + 2012-07-20 Dmitry Antipov Add indirection counting to speed up Fkill_buffer. diff --git a/src/window.c b/src/window.c index 3bf73134468..b7b6e283cc1 100644 --- a/src/window.c +++ b/src/window.c @@ -144,11 +144,15 @@ decode_window (register Lisp_Object window) static struct window * decode_any_window (register Lisp_Object window) { + struct window *w; + if (NILP (window)) return XWINDOW (selected_window); CHECK_WINDOW (window); - return XWINDOW (window); + w = XWINDOW (window); + CHECK_LIVE_FRAME (w->frame); + return w; } DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,