noooo dont free our lumppat
for some reason this occasioncally causes an use after free?? our memory management honestly is a fucking mess ngl
This commit is contained in:
1 parent
8a80f0571c
commit
a6bebb2d91
1 file changed
+1
-4
+1
-4
@@ -554,7 +554,7 @@ patch_t *Patch_GetRotatedSprite(spriteframe_t *sprite, size_t frame, size_t spri
|
||||
if (lump == LUMPERROR)
|
||||
return NULL;
|
||||
|
||||
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
|
||||
patch = (patch_t *)W_CachePatchNum(lump, PU_CACHE); // PU_LEVEL
|
||||
|
||||
if (sprinfo->available)
|
||||
{
|
||||
@@ -568,9 +568,6 @@ patch_t *Patch_GetRotatedSprite(spriteframe_t *sprite, size_t frame, size_t spri
|
||||
}
|
||||
|
||||
RotatedPatch_DoRotation(rotsprite, patch, rotationangle, xpivot, ypivot, flip);
|
||||
|
||||
// free image data
|
||||
Z_Free(patch);
|
||||
}
|
||||
|
||||
return rotsprite->patches[idx];
|
||||
|
||||
Reference in new issue
Block a user