summaryrefslogtreecommitdiff
path: root/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'undo.c')
-rw-r--r--undo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/undo.c b/undo.c
index c0ba631..eb042b2 100644
--- a/undo.c
+++ b/undo.c
@@ -139,6 +139,9 @@ _rl_copy_undo_list (head)
{
UNDO_LIST *list, *new, *roving, *c;
+ if (head == 0)
+ return head;
+
list = head;
new = 0;
while (list)