1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

Check display before free.

Should fix #1203.
This commit is contained in:
Brenden Matthews 2022-09-19 09:46:41 -05:00
parent 5a2a1470b2
commit 52033d13f4
No known key found for this signature in database
GPG Key ID: B49ABB7270D9D4FD

View File

@ -433,9 +433,11 @@ static void init_X11() {
} }
static void deinit_X11() { static void deinit_X11() {
DBGP("deinit_X11()"); if (display) {
XCloseDisplay(display); DBGP("deinit_X11()");
display = nullptr; XCloseDisplay(display);
display = nullptr;
}
} }
static void update_workarea() { static void update_workarea() {