changeset 70736:6e5b403b5586

(foreach_window): Check WINDOWP (FRAME_ROOT_WINDOW (f)).
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Fri, 19 May 2006 09:12:26 +0000
parents d0bad3102124
children e68fe4e7401b
files src/window.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Fri May 19 09:12:04 2006 +0000
+++ b/src/window.c	Fri May 19 09:12:26 2006 +0000
@@ -6796,7 +6796,9 @@
      int (* fn) P_ ((struct window *, void *));
      void *user_data;
 {
-  foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data);
+  /* Fdelete_frame may set FRAME_ROOT_WINDOW (f) to Qnil.  */
+  if (WINDOWP (FRAME_ROOT_WINDOW (f)))
+    foreach_window_1 (XWINDOW (FRAME_ROOT_WINDOW (f)), fn, user_data);
 }