src/render/SDL_render.c
changeset 6533 c784245304dd
parent 6532 58f726a2fc82
child 6545 01216d38e4d9
--- a/src/render/SDL_render.c	Mon Oct 01 23:28:19 2012 -0700
+++ b/src/render/SDL_render.c	Tue Oct 02 00:28:23 2012 -0700
@@ -418,7 +418,13 @@
 
         /* Swap textures to have texture before texture->native in the list */
         texture->native->next = texture->next;
+        if (texture->native->next) {
+            texture->native->next->prev = texture->native;
+        }
         texture->prev = texture->native->prev;
+        if (texture->prev) {
+            texture->prev->next = texture;
+        }
         texture->native->prev = texture;
         texture->next = texture->native;
         renderer->textures = texture;