[tracker] Album art fixes



commit c1eca7316e7fa843e8a0fbeb4dd444c4b8868812
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Apr 14 12:12:12 2009 +0200

    Album art fixes
    
    Fixes in tracker-albumart.c for tracker-extract's unit tests
    (info->hal must support being NULL).
---
 src/libtracker-common/tracker-albumart.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/libtracker-common/tracker-albumart.c b/src/libtracker-common/tracker-albumart.c
index fb0fe7e..5e6284c 100644
--- a/src/libtracker-common/tracker-albumart.c
+++ b/src/libtracker-common/tracker-albumart.c
@@ -540,7 +540,7 @@ tracker_albumart_queue_cb (DBusGProxy     *proxy,
 		g_clear_error (&error);
 	}
 
-	if (info->art_path &&
+	if (info->hal && info->art_path &&
 	    g_file_test (info->art_path, G_FILE_TEST_EXISTS)) {
 		gchar *uri;
 		
@@ -664,8 +664,6 @@ tracker_albumart_request_download (TrackerHal  *hal,
 {
 	GetFileInfo *info;
 
-	g_return_if_fail (hal != NULL);
-
 	if (no_more_requesting) {
 		return;
 	}
@@ -673,7 +671,7 @@ tracker_albumart_request_download (TrackerHal  *hal,
 	info = g_slice_new (GetFileInfo);
 
 #ifdef HAVE_HAL
-	info->hal = g_object_ref (hal);
+	info->hal = hal?g_object_ref (hal):NULL;
 #else 
 	info->hal = NULL;
 #endif



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