From 564838a4393e1d3fc2d2bc04fbc1f94013db157c Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 29 Sep 2024 15:15:49 +0200 Subject: [PATCH] only draw lua hud stuff when patch exists --- src/lua_hudlib_drawlist.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lua_hudlib_drawlist.c b/src/lua_hudlib_drawlist.c index 2ee9b8156..1cef45a87 100644 --- a/src/lua_hudlib_drawlist.c +++ b/src/lua_hudlib_drawlist.c @@ -632,12 +632,18 @@ void LUA_HUD_DrawList(huddrawlist_h list) switch (item->type) { case DI_Draw: + if (!item->patch || item->patch == NULL) + return; V_DrawFixedPatch(LERPS(x), LERPS(y), FRACUNIT, item->flags, item->patch, item->colormap); break; case DI_DrawScaled: + if (!item->patch || item->patch == NULL) + return; V_DrawFixedPatch(LERPS(x), LERPS(y), LERP(scale), item->flags, item->patch, item->colormap); break; case DI_DrawStretched: + if (!item->patch || item->patch == NULL) + return; V_DrawStretchyFixedPatch(LERPS(x), LERPS(y), LERP(hscale), LERP(vscale), item->flags, item->patch, item->colormap); break; case DI_DrawNum: