summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-07-19 11:33:08 +0800
committerChong Yidong <cyd@gnu.org>2012-07-19 11:33:08 +0800
commit23dc774492e25ee2191ffa4ee966216649dddbc1 (patch)
tree554c009913bb81c7b6aba1da2accf2597bde93d1
parente32a12b5ec3af62d3a152f5924128b34fbb85c99 (diff)
downloademacs-23dc774492e25ee2191ffa4ee966216649dddbc1.tar.gz
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
-rw-r--r--src/ChangeLog6
-rw-r--r--src/window.c6
2 files changed, 10 insertions, 2 deletions
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 <cyd@gnu.org>
+
+ * 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 <eliz@gnu.org>
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))