Commit 8bd993e9 authored by Sam Lantinga's avatar Sam Lantinga

Fixed infinite loop at shutdown - update texture prev links

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404445
parent ca30a739
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment