Fix SDLTexture surface freeing
This commit is contained in:
parent
bf93334b94
commit
aa3cd55b43
1 changed files with 3 additions and 0 deletions
|
@ -182,6 +182,9 @@ void RenderBackend_FreeSurface(RenderBackend_Surface *surface)
|
||||||
if (surface->prev != NULL)
|
if (surface->prev != NULL)
|
||||||
surface->prev->next = surface->next;
|
surface->prev->next = surface->next;
|
||||||
|
|
||||||
|
if (surface->prev == NULL)
|
||||||
|
surface_list_head = surface->next;
|
||||||
|
|
||||||
SDL_DestroyTexture(surface->texture);
|
SDL_DestroyTexture(surface->texture);
|
||||||
free(surface);
|
free(surface);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue