diff audacious/ui_fileinfo.c @ 1964:f027afc2ca2e trunk

[svn] - avoid freeing a NULL pointer in ui_fileinfo.c - add some hooks for newui - implement album art support in newui
author nenolod
date Sun, 12 Nov 2006 03:09:28 -0800
parents cf9329e4c2bd
children beaeb1990cb4
line wrap: on
line diff
--- a/audacious/ui_fileinfo.c	Sun Nov 12 02:37:32 2006 -0800
+++ b/audacious/ui_fileinfo.c	Sun Nov 12 03:09:28 2006 -0800
@@ -586,8 +586,11 @@
 		fullpath = g_strconcat(tuple->file_path, "/", NULL);
 	}
 
-	if (!last_artwork || strcmp(last_artwork, fullpath)){
-		g_free(last_artwork);
+	if (!last_artwork || strcmp(last_artwork, fullpath))
+	{
+		if (last_artwork != NULL)
+			g_free(last_artwork);
+
 		last_artwork = g_strdup(fullpath);
 
 		tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0);