diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 9f02007d4..5b716d6bb 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -73,6 +73,9 @@ static void HWR_DrawColumnInCache(const column_t *patchcol, UINT8 *block, GLMipm (void)patchheight; // This parameter is unused + if (!mipmap || mipmap == NULL) + return; + if (originPatch) // originPatch can be NULL here, unlike in the software version originy = originPatch->originy; 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: