src/video/SDL_video.c
changeset 3315 87ffdad11607
parent 3283 1ed5d432e468
child 3316 9cf18687b761
     1.1 --- a/src/video/SDL_video.c	Sat Sep 26 10:04:38 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Sat Sep 26 10:13:44 2009 +0000
     1.3 @@ -1596,6 +1596,7 @@
     1.4  
     1.5      renderer = SDL_CurrentDisplay.current_renderer;
     1.6      if (!renderer) {
     1.7 +        SDL_SetError("No current renderer available");
     1.8          return 0;
     1.9      }
    1.10  
    1.11 @@ -1815,10 +1816,7 @@
    1.12      if (bpp == fmt->BitsPerPixel && Rmask == fmt->Rmask && Gmask == fmt->Gmask
    1.13          && Bmask == fmt->Bmask && Amask == fmt->Amask) {
    1.14          if (SDL_MUSTLOCK(surface)) {
    1.15 -            if (SDL_LockSurface(surface) < 0) {
    1.16 -                SDL_DestroyTexture(textureID);
    1.17 -                return 0;
    1.18 -            }
    1.19 +            SDL_LockSurface(surface);
    1.20              SDL_UpdateTexture(textureID, NULL, surface->pixels,
    1.21                                surface->pitch);
    1.22              SDL_UnlockSurface(surface);