From: Ray Strode Date: Mon, 24 Nov 2008 22:42:11 +0000 (-0500) Subject: Allow NULL to be passed to ply_image_free() X-Git-Tag: 0.6.0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29157abbb1687d16cc54df30f04ceec27237b96d;p=thirdparty%2Fplymouth.git Allow NULL to be passed to ply_image_free() free() allows NULL so there is no reason ply_image_free shouldn't. This also papers over a bug in the solar plugin that we haven't been able to identify yet. --- diff --git a/src/libplybootsplash/ply-image.c b/src/libplybootsplash/ply-image.c index 1cc4476e..25aac549 100644 --- a/src/libplybootsplash/ply-image.c +++ b/src/libplybootsplash/ply-image.c @@ -115,7 +115,9 @@ ply_image_new (const char *filename) void ply_image_free (ply_image_t *image) { - assert (image != NULL); + if (image == NULL) + return; + assert (image->filename != NULL); if (image->layout.address != NULL)