From: Charlie Brej Date: Sun, 18 Apr 2010 18:27:46 +0000 (+0100) Subject: [image] Add asserts to make sure NULL is not passed as the image X-Git-Tag: 0.8.3~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9ad6d5af3fd19a09382edcd9421eca5d4ab2dcf;p=thirdparty%2Fplymouth.git [image] Add asserts to make sure NULL is not passed as the image --- diff --git a/src/libply-splash-graphics/ply-image.c b/src/libply-splash-graphics/ply-image.c index 562210d3..b75dcb34 100644 --- a/src/libply-splash-graphics/ply-image.c +++ b/src/libply-splash-graphics/ply-image.c @@ -258,6 +258,8 @@ ply_image_rotate (ply_image_t *image, ply_pixel_buffer_t * ply_image_convert_get_buffer (ply_image_t *image) { + assert (image != NULL); + return image->buffer; } @@ -265,7 +267,9 @@ ply_pixel_buffer_t * ply_image_convert_to_pixel_buffer (ply_image_t *image) { ply_pixel_buffer_t *buffer; - + + assert (image != NULL); + buffer = image->buffer; image->buffer = NULL; ply_image_free (image);