src/video/SDL_video.c
changeset 3692 ad85eb21a559
parent 3686 d87db9cf6a31
child 3693 d3f330fc2009
--- 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 {