From d994af033496d75589729664d28a6592fccf7251 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 14 Jul 2018 20:02:03 +0200 Subject: [PATCH] tweaks: avoid dereferencing a pointer when it is NULL [coverity scan] --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index 8ed330d3..f6f1deaa 100644 --- a/src/text.c +++ b/src/text.c @@ -862,7 +862,7 @@ void do_redo(void) while (u != NULL && u->next != openfile->current_undo) u = u->next; - if (u->next != openfile->current_undo) { + if (u == NULL) { statusline(ALERT, "Bad undo stack -- please report a bug"); return; }