(record_delete): If we hit the end of the undo list, stop picking elements
authorKen Raeburn <raeburn@raeburn.org>
Wed, 26 Apr 2000 18:39:30 +0000 (18:39 +0000)
committerKen Raeburn <raeburn@raeburn.org>
Wed, 26 Apr 2000 18:39:30 +0000 (18:39 +0000)
apart.

src/undo.c

index a498f2aae725ae174261f86b35b0668a69ac568d..c09da9cddb51ea0922702bfad5e85ada34e9bb13 100644 (file)
@@ -115,7 +115,10 @@ record_delete (beg, string)
 
       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);