aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-11-16 12:26:20 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-18 21:57:48 +0100
commit5955f44adea310b735aae307407a807d7acd74c0 (patch)
treeed702409eebac13751f03a7fbe9e270553540349 /src
parentc802869e99f8a56ba2eceea2f62d29c0cc673210 (diff)
downloadrneovim-5955f44adea310b735aae307407a807d7acd74c0.tar.gz
rneovim-5955f44adea310b735aae307407a807d7acd74c0.tar.bz2
rneovim-5955f44adea310b735aae307407a807d7acd74c0.zip
Fix warnings: window.c: winframe_remove(): Np dereference: FP.
Problem : Dereference of null pointer @ 2196. Diagnostic : False positive. Rationale : Suggested error path implies `frp->child == NULL` while being under condition `frp2->fr_layout == frp->fr_layout`, which is impossible: - If frp2 is frp's parent, then frp2's layout is FR_COL or FR_ROW; - if frp->child is NULL, the frp's layout is FR_LEAF. - Therefore, they can't be equal. Resolution : Assert frp->child not null.
Diffstat (limited to 'src')
-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 0ca3b1ca34..96f074c9a5 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2194,6 +2194,7 @@ winframe_remove (
* the frames into this list. */
if (frp2->fr_child == frp)
frp2->fr_child = frp->fr_child;
+ assert(frp->fr_child);
frp->fr_child->fr_prev = frp->fr_prev;
if (frp->fr_prev != NULL)
frp->fr_prev->fr_next = frp->fr_child;