--- 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;