mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-20 21:38:15 -04:00
fix: fix potential wild Pointers
This commit is contained in:
parent
8a3b94bc6f
commit
142cbb5e06
1 changed files with 6 additions and 0 deletions
|
|
@ -151,6 +151,12 @@ static void dwindle_remove(DwindleNode **root, Client *c) {
|
|||
return;
|
||||
|
||||
DwindleNode *parent = leaf->parent;
|
||||
|
||||
if (dwindle_locked_h_node == leaf || dwindle_locked_h_node == parent)
|
||||
dwindle_locked_h_node = NULL;
|
||||
if (dwindle_locked_v_node == leaf || dwindle_locked_v_node == parent)
|
||||
dwindle_locked_v_node = NULL;
|
||||
|
||||
if (!parent) {
|
||||
free(leaf);
|
||||
*root = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue