* Handle the case where we have a embedded album art image size, but no data.

This commit is contained in:
Justin Maggard 2009-03-18 17:34:30 +00:00
parent d484d5870c
commit 06fb334cad

View File

@ -215,8 +215,12 @@ check_embedded_art(const char * path, const char * image_data, int image_size)
static unsigned int last_hash = 0; static unsigned int last_hash = 0;
unsigned int hash; unsigned int hash;
if( !image_data || !image_size || !path )
{
return NULL;
}
/* If the embedded image matches the embedded image from the last file we /* If the embedded image matches the embedded image from the last file we
* checked, just make a hard link. No use in storing it on the disk twice. */ * checked, just make a hard link. Better than storing it on the disk twice. */
hash = DJBHash(image_data, image_size); hash = DJBHash(image_data, image_size);
if( hash == last_hash ) if( hash == last_hash )
{ {