1
0
Fork 0
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:
Yuxuan Shui 2024-05-25 09:15:09 +01:00
parent 9a83982d7e
commit 254eab059f
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -2526,8 +2526,10 @@ static void session_destroy(session_t *ps) {
command_builder_free(ps->command_builder);
ps->command_builder = NULL;
if (ps->file_watch_handle) {
file_watch_destroy(ps->loop, ps->file_watch_handle);
ps->file_watch_handle = NULL;
}
// Stop listening to events on root window
xcb_change_window_attributes(ps->c.c, ps->c.screen_info->root, XCB_CW_EVENT_MASK,