src/render/software/SDL_render_sw.c
changeset 5567 441c3036440c
parent 5535 96594ac5fd1a
child 6044 35448a5ea044
--- a/src/render/software/SDL_render_sw.c	Sat Jul 16 14:59:12 2011 -0700
+++ b/src/render/software/SDL_render_sw.c	Fri Jun 10 12:13:06 2011 +0300
@@ -240,6 +240,8 @@
     int row;
     size_t length;
 
+    if(SDL_MUSTLOCK(surface))
+        SDL_LockSurface(surface);
     src = (Uint8 *) pixels;
     dst = (Uint8 *) surface->pixels +
                         rect->y * surface->pitch +
@@ -250,6 +252,8 @@
         src += pitch;
         dst += surface->pitch;
     }
+    if(SDL_MUSTLOCK(surface))
+        SDL_UnlockSurface(surface);
     return 0;
 }