From e8d505ba029df2e90bab88addfc21007c406e308 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 10 Nov 2005 03:40:45 +0000 Subject: [PATCH] fix still *more* backup_lines() breakage git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index 83afd0d6..6cea1812 100644 --- a/src/text.c +++ b/src/text.c @@ -1002,7 +1002,7 @@ filestruct *backup_lines(filestruct *first_line, size_t par_len) top = openfile->current->prev; else top = openfile->current; - for (i = par_len; i > 0; i--) { + for (i = par_len; i > 0 && top != NULL; i--) { if (top->lineno == fl_lineno_save) first_line = top; if (top->lineno == edittop_lineno_save) -- 2.39.5