mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.1702: crash when using undo after deleting folded lines
Problem: Crash when using undo after deleting folded lines. Solution: Check for NULL pointer. (closes #6968)
This commit is contained in:
@@ -2422,8 +2422,8 @@ foldUpdateIEMSRecurse(
|
||||
&& flp->lvl > 0)
|
||||
{
|
||||
(void)foldFind(gap, startlnum - 1, &fp);
|
||||
if (fp >= ((fold_T *)gap->ga_data) + gap->ga_len
|
||||
|| fp->fd_top >= startlnum)
|
||||
if (fp != NULL && (fp >= ((fold_T *)gap->ga_data) + gap->ga_len
|
||||
|| fp->fd_top >= startlnum))
|
||||
fp = NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user