mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user