From 514bb306554f515b814fdb73d18ffa31f167693b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 28 Nov 2023 16:02:38 +0900 Subject: [PATCH] [iqm] Make the null texture static That was a nasty bit of UB that wasn't discovered until Tracy affected the stack, I guess (maybe because of the cleanup attribute). --- libs/models/iqm/vulkan_model_iqm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/models/iqm/vulkan_model_iqm.c b/libs/models/iqm/vulkan_model_iqm.c index b86e4108d..297d1f592 100644 --- a/libs/models/iqm/vulkan_model_iqm.c +++ b/libs/models/iqm/vulkan_model_iqm.c @@ -199,7 +199,7 @@ vulkan_iqm_load_textures (model_t *mod, iqm_t *iqm, qfv_iqm_t *mesh, dstring_copystr (str, iqm->text + iqm->meshes[i].material); QFS_StripExtension (str->str, str->str); if (!(tex = LoadImage (va (0, "textures/%s", str->str), 1))) { - tex_t null_tex = { + static tex_t null_tex = { .width = 2, .height = 2, .format = tex_rgba,