changeset 37492:b9cea35cf91f

(save_excursion_restore): Don't use XBUFFER on a non-buffer.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 26 Apr 2001 12:37:03 +0000
parents 772178ae2c7e
children 36a6344d04e3
files src/editfns.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Thu Apr 26 11:35:32 2001 +0000
+++ b/src/editfns.c	Thu Apr 26 12:37:03 2001 +0000
@@ -848,8 +848,11 @@
   tem = XCDR (info);
   if (visible_p
       && !EQ (tem, selected_window)
-      /* This also verifies that the window is still live.  */
-      && XBUFFER (XWINDOW (tem)->buffer) == current_buffer)
+      && (tem1 = XWINDOW (tem)->buffer,
+	  (/* Window is live...  */
+	   BUFFERP (tem1)
+	   /* ...and it shows the current buffer.  */
+	   && XBUFFER (tem1) == current_buffer)))
     Fset_window_point (tem, make_number (PT));
 
   UNGCPRO;