mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
core: fix NULL-dereference of file_watch_handle
It's not initialized if there is no config file to watch. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
9a83982d7e
commit
254eab059f
1 changed files with 4 additions and 2 deletions
|
@ -2526,8 +2526,10 @@ static void session_destroy(session_t *ps) {
|
||||||
command_builder_free(ps->command_builder);
|
command_builder_free(ps->command_builder);
|
||||||
ps->command_builder = NULL;
|
ps->command_builder = NULL;
|
||||||
|
|
||||||
file_watch_destroy(ps->loop, ps->file_watch_handle);
|
if (ps->file_watch_handle) {
|
||||||
ps->file_watch_handle = NULL;
|
file_watch_destroy(ps->loop, ps->file_watch_handle);
|
||||||
|
ps->file_watch_handle = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// Stop listening to events on root window
|
// Stop listening to events on root window
|
||||||
xcb_change_window_attributes(ps->c.c, ps->c.screen_info->root, XCB_CW_EVENT_MASK,
|
xcb_change_window_attributes(ps->c.c, ps->c.screen_info->root, XCB_CW_EVENT_MASK,
|
||||||
|
|
Loading…
Reference in a new issue