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:
Eliseo Martínez
2014-11-16 12:26:20 +01:00
parent c802869e99
commit 5955f44ade

View File

@@ -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;