Skip to content

Commit fd95e72

Browse files
committed
Fix deallocation textures
1 parent af3372c commit fd95e72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/render/psp/SDL_render_psp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,8 +978,9 @@ static void PSP_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
978978
return;
979979
}
980980

981-
vfree(psp_tex->swizzledData);
982-
if (texture->access != SDL_TEXTUREACCESS_STATIC) {
981+
if (psp_tex->swizzledData) {
982+
vfree(psp_tex->swizzledData);
983+
} else if (texture->access != SDL_TEXTUREACCESS_STATIC) {
983984
vfree(psp_tex->data);
984985
} else {
985986
SDL_free(psp_tex->data);

0 commit comments

Comments
 (0)