Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed infinite loop at shutdown - update texture prev links

  • Loading branch information
slouken committed Jan 22, 2010
1 parent 9062858 commit d6532c9b35de3668e47c0a2b7b1b0f18e519c8f0
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/video/SDL_video.c
@@ -1643,6 +1643,9 @@ SDL_CreateTexture(Uint32 format, int access, int w, int h)
texture->a = 255;
texture->renderer = renderer;
texture->next = renderer->textures;
if (renderer->textures) {
renderer->textures->prev = texture;
}
renderer->textures = texture;

if (renderer->CreateTexture(renderer, texture) < 0) {
@@ -2696,6 +2699,9 @@ SDL_DestroyTexture(SDL_Texture * texture)
}

renderer = texture->renderer;
if (texture->next) {
texture->next->prev = texture->prev;
}
if (texture->prev) {
texture->prev->next = texture->next;
} else {

0 comments on commit d6532c9

Please sign in to comment.