Don't crash if we are asked to convert a surface to a NULl buffer.
1.1 --- a/src/video/SDL_surface.c Mon Feb 25 01:51:21 2013 -0500
1.2 +++ b/src/video/SDL_surface.c Mon Feb 25 00:54:25 2013 -0800
1.3 @@ -935,6 +935,16 @@
1.4 SDL_Rect rect;
1.5 void *nonconst_src = (void *) src;
1.6
1.7 + /* Check to make sure we are bliting somewhere, so we don't crash */
1.8 + if (!dst) {
1.9 + SDL_InvalidParamError("dst");
1.10 + return -1;
1.11 + }
1.12 + if (!dst_pitch) {
1.13 + SDL_InvalidParamError("dst_pitch");
1.14 + return -1;
1.15 + }
1.16 +
1.17 /* Fast path for same format copy */
1.18 if (src_format == dst_format) {
1.19 int bpp;