mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 02:01:42 -05:00
Avoid accessing freed nodes in cancel_presel
Since cancel_presel is called by destroy_tree, we have to be careful not to access any node besides n.
This commit is contained in:
parent
7c52a2bd12
commit
1b6224485d
1 changed files with 2 additions and 2 deletions
4
tree.c
4
tree.c
|
@ -229,7 +229,7 @@ void cancel_presel(monitor_t *m, desktop_t *d, node_t *n)
|
|||
}
|
||||
|
||||
if (focus_follows_pointer) {
|
||||
listen_enter_notify(d->root, false);
|
||||
listen_enter_notify(n, false);
|
||||
}
|
||||
|
||||
if (n->presel->feedback != XCB_NONE) {
|
||||
|
@ -237,7 +237,7 @@ void cancel_presel(monitor_t *m, desktop_t *d, node_t *n)
|
|||
}
|
||||
|
||||
if (focus_follows_pointer) {
|
||||
listen_enter_notify(d->root, true);
|
||||
listen_enter_notify(n, true);
|
||||
}
|
||||
|
||||
free(n->presel);
|
||||
|
|
Loading…
Add table
Reference in a new issue