mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-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 vim/vim#6968)
da697645d5
This commit is contained in:
@@ -2227,8 +2227,9 @@ static linenr_T foldUpdateIEMSRecurse(
|
||||
if (getlevel == foldlevelMarker && flp->start <= flp->lvl - level
|
||||
&& 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