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:
Eliseo Martínez 2014-11-16 13:34:57 +01:00
parent 5955f44ade
commit f544d976fa

View File

@ -4504,6 +4504,7 @@ void win_drag_vsep_line(win_T *dragwin, int offset)
room += fr->fr_width - frame_minwidth(fr, NULL); room += fr->fr_width - frame_minwidth(fr, NULL);
fr = curfr; /* put fr at window that grows */ fr = curfr; /* put fr at window that grows */
} }
assert(fr);
if (room < offset) /* Not enough room */ if (room < offset) /* Not enough room */
offset = room; /* Move as far as we can */ offset = room; /* Move as far as we can */