changeset 84376:584ae8393da8

(freeze_window_start): Don't presume selected_window holds a window object.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 07 Sep 2007 19:45:10 +0000
parents 3dfbf778e937
children d898f83efc5c
files src/window.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Fri Sep 07 19:45:04 2007 +0000
+++ b/src/window.c	Fri Sep 07 19:45:10 2007 +0000
@@ -7111,11 +7111,12 @@
      struct window *w;
      void *freeze_p;
 {
-  if (w == XWINDOW (selected_window)
-      || MINI_WINDOW_P (w)
-      || (MINI_WINDOW_P (XWINDOW (selected_window))
-	  && ! NILP (Vminibuf_scroll_window)
-	  && w == XWINDOW (Vminibuf_scroll_window)))
+  if (MINI_WINDOW_P (w)
+      || (WINDOWP (selected_window) /* Can be nil in corner cases.  */
+         && (w == XWINDOW (selected_window)
+             || (MINI_WINDOW_P (XWINDOW (selected_window))
+                 && ! NILP (Vminibuf_scroll_window)
+                 && w == XWINDOW (Vminibuf_scroll_window)))))
     freeze_p = NULL;
 
   w->frozen_window_start_p = freeze_p != NULL;