src/video/SDL_blit_N.c
changeset 10558 5184186d4366
parent 9998 f67cf37e9cd4
child 10559 fbf9b0e3589a
     1.1 --- a/src/video/SDL_blit_N.c	Wed Oct 19 21:22:42 2016 -0700
     1.2 +++ b/src/video/SDL_blit_N.c	Sat Oct 22 11:01:55 2016 -0700
     1.3 @@ -118,12 +118,6 @@
     1.4          16, 8, 0, 24,
     1.5          0, NULL
     1.6      };
     1.7 -    if (!srcfmt) {
     1.8 -        srcfmt = &default_pixel_format;
     1.9 -    }
    1.10 -    if (!dstfmt) {
    1.11 -        dstfmt = &default_pixel_format;
    1.12 -    }
    1.13      const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
    1.14                                                         0x04, 0x04, 0x04, 0x04,
    1.15                                                         0x08, 0x08, 0x08, 0x08,
    1.16 @@ -136,6 +130,14 @@
    1.17      Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
    1.18      Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
    1.19      Uint32 amask;
    1.20 +
    1.21 +    if (!srcfmt) {
    1.22 +        srcfmt = &default_pixel_format;
    1.23 +    }
    1.24 +    if (!dstfmt) {
    1.25 +        dstfmt = &default_pixel_format;
    1.26 +    }
    1.27 +
    1.28      /* Use zero for alpha if either surface doesn't have alpha */
    1.29      if (dstfmt->Amask) {
    1.30          amask =