From ca911dd634ce5d6576406dc4b5f02b42ed9462ae Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 1 Nov 2020 20:16:30 -0500 Subject: [PATCH] Fix Client Segfault --- mods/src/compat.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/mods/src/compat.c b/mods/src/compat.c index e6122dfd7..6da31aa67 100644 --- a/mods/src/compat.c +++ b/mods/src/compat.c @@ -449,17 +449,12 @@ static void x11_nop() { // NOP } HOOK(SDL_GetWMInfo, int, (SDL_SysWMinfo *info)) { - if (!is_server) { - ensure_SDL_GetWMInfo(); - return (*real_SDL_GetWMInfo)(info); - } else { - // Return Fake Lock Functions In Server Mode Since X11 Is Disabled - SDL_SysWMinfo ret; - ret.info.x11.lock_func = x11_nop; - ret.info.x11.unlock_func = x11_nop; - *info = ret; - return 1; - } + // Return Fake Lock Functions In Server Mode Since SDL X11 Is Disabled + SDL_SysWMinfo ret; + ret.info.x11.lock_func = x11_nop; + ret.info.x11.unlock_func = x11_nop; + *info = ret; + return 1; } #include