changeset 28725:12d806a22931

(record_delete): If we hit the end of the undo list, stop picking elements apart.
author Ken Raeburn <raeburn@raeburn.org>
date Wed, 26 Apr 2000 18:39:30 +0000
parents 48df558593f9
children 5f7ccec488b5
files src/undo.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Wed Apr 26 17:46:21 2000 +0000
+++ b/src/undo.c	Wed Apr 26 18:39:30 2000 +0000
@@ -115,7 +115,10 @@
 
       while (1)
 	{
-	  elt = XCAR (tail);
+	  if (NILP (tail))
+	    elt = Qnil;
+	  else
+	    elt = XCAR (tail);
 	  if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt))))
 	    break;
 	  tail = XCDR (tail);