# HG changeset patch # User Sam Lantinga # Date 1264175720 0 # Node ID ad85eb21a559d8fbed79cff2670a04c575f63b72 # Parent 9fed2aa469edb72b390e21d7a8aa2bb6ada3803d Fixed infinite loop at shutdown - update texture prev links diff -r 9fed2aa469ed -r ad85eb21a559 src/video/SDL_video.c --- a/src/video/SDL_video.c Fri Jan 22 06:50:17 2010 +0000 +++ b/src/video/SDL_video.c Fri Jan 22 15:55:20 2010 +0000 @@ -1643,6 +1643,9 @@ 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 @@ } renderer = texture->renderer; + if (texture->next) { + texture->next->prev = texture->prev; + } if (texture->prev) { texture->prev->next = texture->next; } else {