Skip to content

Commit

Permalink
wm: fixed segmentation fault in wm_find_leader
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Sep 9, 2024
1 parent e3581fc commit 1d1b224
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wm/wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ static struct wm_tree_node *wm_find_leader(struct wm *wm, struct wm_tree_node *n
return node->leader_final;
}
leader_node = wm_tree_find_toplevel_for(&wm->tree, leader_node);
if (leader_node == NULL) {
return node->leader_final;
}
node->visited = true;
node->leader_final = wm_find_leader(wm, leader_node);
node->visited = false;
Expand Down

0 comments on commit 1d1b224

Please sign in to comment.