aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-11-16 13:34:57 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-18 21:57:48 +0100
commitf544d976faf23649a5015eb25f3296f715a7a1bc (patch)
tree23d065fb09d5f698a6faf640f344492d04a20396
parent5955f44adea310b735aae307407a807d7acd74c0 (diff)
downloadrneovim-f544d976faf23649a5015eb25f3296f715a7a1bc.tar.gz
rneovim-f544d976faf23649a5015eb25f3296f715a7a1bc.tar.bz2
rneovim-f544d976faf23649a5015eb25f3296f715a7a1bc.zip
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.
-rw-r--r--src/nvim/window.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 96f074c9a5..63c46f243e 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -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 */