1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 13:39: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() {
DBGP("deinit_X11()");
XCloseDisplay(display);
display = nullptr;
if (display) {
DBGP("deinit_X11()");
XCloseDisplay(display);
display = nullptr;
}
}
static void update_workarea() {