fix another -Wnull-dereference warning

This commit is contained in:
Alug committed 2025-12-27 15:06:50 +01:00
1 parent 495c34dd40
commit a2616778cc
1 file changed
+3 -1
+3 -1
View File
@@ -1998,13 +1998,15 @@ void *W_CachePatchNameRotated(const char *name, INT32 rotationangle, INT32 tag)
rspr = (rotsprite_t *)W_GetCachedRotPatchPwad(WADFILENUM(num),LUMPNUM(num));
if (rspr == NULL)
return W_CachePatchNum(W_GetNumForName("MISSING"), tag);
return W_CachePatchNum(num, tag);
if (rspr->patches[idx] == NULL)
{
INT32 xpivot = 0, ypivot = 0;
ptr = (patch_t *)W_CachePatchNum(num, PU_PATCH);
if (ptr == NULL)
return W_CachePatchNum(num, tag);
// >y pivot centered
// >x pivot not centered