aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/undo.c5
1 files changed, 4 insertions, 1 deletions
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)
115 115
116 while (1) 116 while (1)
117 { 117 {
118 elt = XCAR (tail); 118 if (NILP (tail))
119 elt = Qnil;
120 else
121 elt = XCAR (tail);
119 if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt)))) 122 if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt))))
120 break; 123 break;
121 tail = XCDR (tail); 124 tail = XCDR (tail);