Fix LRU when destroying texture.
This commit is contained in:
parent
c3ec62d6a6
commit
09f4711f40
1 changed files with 2 additions and 1 deletions
|
@ -534,7 +534,7 @@ PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||||
PSP_TextureData* psp_texture = (PSP_TextureData*) SDL_calloc(1, sizeof(*psp_texture));
|
PSP_TextureData* psp_texture = (PSP_TextureData*) SDL_calloc(1, sizeof(*psp_texture));
|
||||||
|
|
||||||
if(!psp_texture)
|
if(!psp_texture)
|
||||||
return -1;
|
return SDL_OutOfMemory();
|
||||||
|
|
||||||
psp_texture->swizzled = SDL_FALSE;
|
psp_texture->swizzled = SDL_FALSE;
|
||||||
psp_texture->width = texture->w;
|
psp_texture->width = texture->w;
|
||||||
|
@ -1295,6 +1295,7 @@ PSP_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||||
if(psp_texture == 0)
|
if(psp_texture == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
LRUTargetRemove(renderdata, psp_texture);
|
||||||
TextureStorageFree(psp_texture->data);
|
TextureStorageFree(psp_texture->data);
|
||||||
SDL_free(psp_texture);
|
SDL_free(psp_texture);
|
||||||
texture->driverdata = NULL;
|
texture->driverdata = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue