From 86a375f8697c3b81b22a8de680da7dfc22512ac3 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 26 Apr 2000 18:39:30 +0000 Subject: [PATCH] (record_delete): If we hit the end of the undo list, stop picking elements apart. --- src/undo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/undo.c b/src/undo.c index a498f2aae72..c09da9cddb5 100644 --- a/src/undo.c +++ b/src/undo.c @@ -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); -- 2.39.5