src/render/software/SDL_render_sw.c
changeset 5567 441c3036440c
parent 5535 96594ac5fd1a
child 6044 35448a5ea044
     1.1 --- a/src/render/software/SDL_render_sw.c	Sat Jul 16 14:59:12 2011 -0700
     1.2 +++ b/src/render/software/SDL_render_sw.c	Fri Jun 10 12:13:06 2011 +0300
     1.3 @@ -240,6 +240,8 @@
     1.4      int row;
     1.5      size_t length;
     1.6  
     1.7 +    if(SDL_MUSTLOCK(surface))
     1.8 +        SDL_LockSurface(surface);
     1.9      src = (Uint8 *) pixels;
    1.10      dst = (Uint8 *) surface->pixels +
    1.11                          rect->y * surface->pitch +
    1.12 @@ -250,6 +252,8 @@
    1.13          src += pitch;
    1.14          dst += surface->pitch;
    1.15      }
    1.16 +    if(SDL_MUSTLOCK(surface))
    1.17 +        SDL_UnlockSurface(surface);
    1.18      return 0;
    1.19  }
    1.20