]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[image] Add asserts to make sure NULL is not passed as the image
authorCharlie Brej <cbrej@cs.man.ac.uk>
Sun, 18 Apr 2010 18:27:46 +0000 (19:27 +0100)
committerCharlie Brej <cbrej@cs.man.ac.uk>
Sun, 18 Apr 2010 18:27:46 +0000 (19:27 +0100)
src/libply-splash-graphics/ply-image.c

index 562210d3a63e6f60a3cba73ab7da3e416c58c2f0..b75dcb342c0fbc0af0bfbb259f981112a1ee5371 100644 (file)
@@ -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);