From 54ee3f2961c746ee9b31934e5ce9b463a9a8bdc3 Mon Sep 17 00:00:00 2001 From: Indev Date: Tue, 26 Mar 2024 20:40:11 +0300 Subject: [PATCH] R_LoadTexturesPwad: don't do anything wad has no textures --- src/r_data.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/r_data.c b/src/r_data.c index 17b5fb743..179c88492 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -627,6 +627,9 @@ void R_LoadTexturesPwad(UINT16 wadnum) { INT32 newtextures = R_CountTextures(wadnum); + if (!newtextures) + return; + R_AllocateTextures(newtextures); R_DefineTextures(numtextures, wadnum); R_FinishLoadingTextures(newtextures);