[tracker] tracker-extract: albumart: Bugfix NB#169254, critical when album is passed as null



commit 8bc6261f60a6c2b1d596492ca5cd4553b4edfb03
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue May 18 10:21:46 2010 +0200

    tracker-extract: albumart: Bugfix NB#169254, critical when album is passed as null

 src/tracker-extract/tracker-albumart.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index aa17424..604d2ad 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -409,8 +409,8 @@ albumart_heuristic (const gchar *artist,
 	}
 
 	file = NULL;
-	artist_strdown = g_utf8_strdown (artist_stripped, -1);
-	album_strdown = g_utf8_strdown (album_stripped, -1);
+	artist_strdown = artist_stripped ? g_utf8_strdown (artist_stripped, -1) : g_strdup ("");
+	album_strdown = album_stripped ? g_utf8_strdown (album_stripped, -1) : g_strdup ("");
 
 	/* Try to find cover art in the directory */
 	for (name = g_dir_read_name (dir), count = 0, retval = FALSE;
@@ -486,8 +486,8 @@ albumart_heuristic (const gchar *artist,
 			}
 		}
 
-                g_free (name_utf8);
-                g_free (name_strdown);
+		g_free (name_utf8);
+		g_free (name_strdown);
 	}
 
 	if (count >= 50) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]