From afc3badd72cae452685a96198d36e060a2207893 Mon Sep 17 00:00:00 2001 From: alphanu1 <37101891+alphanu1@users.noreply.github.com> Date: Fri, 11 Sep 2020 16:30:43 +0100 Subject: [PATCH] Fixed Crash On Core Load --- gfx/display_servers/dispserv_x11.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gfx/display_servers/dispserv_x11.c b/gfx/display_servers/dispserv_x11.c index 9d2188bb37..1647b5fd56 100644 --- a/gfx/display_servers/dispserv_x11.c +++ b/gfx/display_servers/dispserv_x11.c @@ -276,6 +276,7 @@ static bool x11_display_server_set_resolution(void *data, } } XRRFreeScreenResources(resources); + XCloseDisplay(dpy); } else if (monitor_index != 20) { @@ -619,9 +620,10 @@ static void x11_display_server_destroy(void *data) } } } + XRRFreeScreenResources(resources); + XCloseDisplay(dpy); } - XRRFreeScreenResources(resources); - XCloseDisplay(dpy); + #endif if (dispserv)