fix another -Wnull-dereference warning
This commit is contained in:
1 parent
4e0b7af62f
commit
cf8cff2898
1 file changed
+3
-1
+3
-1
@@ -2012,13 +2012,15 @@ void *W_CachePatchNameRotated(const char *name, INT32 rotationangle, INT32 tag)
|
||||
rspr = static_cast<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 = static_cast<patch_t *>(W_CachePatchNum(num, PU_PATCH));
|
||||
if (ptr == NULL)
|
||||
return W_CachePatchNum(num, tag);
|
||||
|
||||
// >y pivot centered
|
||||
// >x pivot not centered
|
||||
|
||||
Reference in new issue
Block a user