aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 1377282088..d8cf8aa7b7 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2773,7 +2773,10 @@ void u_undoline(void)
void u_blockfree(buf_T *buf)
{
while (buf->b_u_oldhead != NULL) {
+#ifndef NDEBUG
u_header_T *previous_oldhead = buf->b_u_oldhead;
+#endif
+
u_freeheader(buf, buf->b_u_oldhead, NULL);
assert(buf->b_u_oldhead != previous_oldhead);
}