src/render/SDL_yuv_sw.c
changeset 7332 b53acf6ab70b
parent 7191 75360622e65f
child 7487 a4e43eb67e79
     1.1 --- a/src/render/SDL_yuv_sw.c	Thu Jun 13 22:30:02 2013 -0700
     1.2 +++ b/src/render/SDL_yuv_sw.c	Sat Jun 15 02:46:32 2013 -0700
     1.3 @@ -1202,7 +1202,11 @@
     1.4          break;
     1.5      }
     1.6  
     1.7 -    *pixels = swdata->planes[0] + rect->y * swdata->pitches[0] + rect->x * 2;
     1.8 +    if (rect) {
     1.9 +        *pixels = swdata->planes[0] + rect->y * swdata->pitches[0] + rect->x * 2;
    1.10 +    } else {
    1.11 +        *pixels = swdata->planes[0];
    1.12 +    }
    1.13      *pitch = swdata->pitches[0];
    1.14      return 0;
    1.15  }