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 67195235fe..601c3af741 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2677,7 +2677,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);
}