From 8d168076efa75d3b5b43a724a468b2c51c668fbd 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 211b486c4..25b033b17 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);