[maemo-commits] [maemo-commits] r16246 - projects/haf/branches/hildon-thumbnail/daemonize/daemon

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Sep 26 16:06:09 EEST 2008
Author: pvanhoof
Date: 2008-09-26 16:06:07 +0300 (Fri, 26 Sep 2008)
New Revision: 16246

Modified:
   projects/haf/branches/hildon-thumbnail/daemonize/daemon/albumart.c
   projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c
Log:
Bugfix

Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/albumart.c
===================================================================
--- projects/haf/branches/hildon-thumbnail/daemonize/daemon/albumart.c	2008-09-26 13:04:37 UTC (rev 16245)
+++ projects/haf/branches/hildon-thumbnail/daemonize/daemon/albumart.c	2008-09-26 13:06:07 UTC (rev 16246)
@@ -114,10 +114,14 @@
 albumart_queue (Albumart *object, gchar *albumartist, gchar *uri, guint handle_to_unqueue, DBusGMethodInvocation *context)
 {
 	AlbumartPrivate *priv = ALBUMART_GET_PRIVATE (object);
-	WorkTask *task = g_slice_new0 (WorkTask);
+	WorkTask *task;
 	static guint num = 0;
 
+	if (!uri && !albumartist)
+		return;
 
+	task = g_slice_new0 (WorkTask);
+
 	keep_alive ();
 
 	task->unqueued = FALSE;

Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c
===================================================================
--- projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c	2008-09-26 13:04:37 UTC (rev 16245)
+++ projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c	2008-09-26 13:06:07 UTC (rev 16246)
@@ -184,11 +184,13 @@
 thumbnailer_queue (Thumbnailer *object, GStrv urls, guint handle_to_unqueue, DBusGMethodInvocation *context)
 {
 	ThumbnailerPrivate *priv = THUMBNAILER_GET_PRIVATE (object);
-	WorkTask *task = g_slice_new (WorkTask);
+	WorkTask *task;
 	static guint num = 0;
 
 	dbus_async_return_if_fail (urls != NULL, context);
 
+	task = g_slice_new (WorkTask);
+
 	keep_alive ();
 
 	task->unqueued = FALSE;


More information about the maemo-commits mailing list