mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: window.c: win_drag_vsep_line(): Np dereference: FP.
Problem : Dereference of null pointer @ 4512. Diagnostic : False positive. Rationale : Suggested error path implies `fr == NULL` after 4504. That's not possible, because: - curfr and curfr->next must be both nonnull, as we are dragging the divider between the two. - after conditional, fr is one of those two (the one that grows). Resolution : Assert fr.
This commit is contained in:
parent
5955f44ade
commit
f544d976fa
@ -4504,6 +4504,7 @@ void win_drag_vsep_line(win_T *dragwin, int offset)
|
||||
room += fr->fr_width - frame_minwidth(fr, NULL);
|
||||
fr = curfr; /* put fr at window that grows */
|
||||
}
|
||||
assert(fr);
|
||||
|
||||
if (room < offset) /* Not enough room */
|
||||
offset = room; /* Move as far as we can */
|
||||
|
Loading…
Reference in New Issue
Block a user