]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Allow NULL to be passed to ply_image_free() 0.6.0
authorRay Strode <rstrode@redhat.com>
Mon, 24 Nov 2008 22:42:11 +0000 (17:42 -0500)
committerRay Strode <rstrode@redhat.com>
Mon, 24 Nov 2008 22:42:11 +0000 (17:42 -0500)
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.

src/libplybootsplash/ply-image.c

index 1cc4476ef47dc14313ea60ee7fcea25f1ccea047..25aac54932294e8ec235e47735c932bd1406aaed 100644 (file)
@@ -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)