[maemo-commits] [maemo-commits] r17641 - in projects/haf/trunk/hildon-thumbnail: . thumbs

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Mar 11 19:24:57 EET 2009
Author: pvanhoof
Date: 2009-03-11 19:24:48 +0200 (Wed, 11 Mar 2009)
New Revision: 17641

Modified:
   projects/haf/trunk/hildon-thumbnail/ChangeLog
   projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c
Log:
2009-03-11  Philip Van Hoof  <pvanhoof at codeminded.be>

        * thumbs/hildon-thumbnail-obj.c: Fixed a crash when joining



Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-thumbnail/ChangeLog	2009-03-11 17:10:15 UTC (rev 17640)
+++ projects/haf/trunk/hildon-thumbnail/ChangeLog	2009-03-11 17:24:48 UTC (rev 17641)
@@ -1,3 +1,7 @@
+2009-03-11  Philip Van Hoof  <pvanhoof at codeminded.be>
+
+	* thumbs/hildon-thumbnail-obj.c: Fixed a crash when joining
+
 2009-03-09  Philip Van Hoof  <pvanhoof at codeminded.be>
 
 	* daemon/plugins/gdkpixbuf-plugin.c

Modified: projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c
===================================================================
--- projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c	2009-03-11 17:10:15 UTC (rev 17640)
+++ projects/haf/trunk/hildon-thumbnail/thumbs/hildon-thumbnail-obj.c	2009-03-11 17:24:48 UTC (rev 17641)
@@ -295,6 +295,7 @@
 {
 	HildonThumbnailRequestPrivate *r_priv = REQUEST_GET_PRIVATE (user_data);
 	create_pixbuf_and_callback (r_priv);
+	waiting_for_cb = FALSE;
 	return FALSE;
 }
 
@@ -506,8 +507,8 @@
 		mime_types[0] = g_strdup (mime_type);
 	}
 
+	waiting_for_cb = TRUE;
 	if (!have) {
-		waiting_for_cb = TRUE;
 		org_freedesktop_thumbnailer_Generic_queue_async (f_priv->proxy, 
 								 (const char **) r_priv->uris, 
 								 (const char **) mime_types,
@@ -603,11 +604,16 @@
 {
 	HildonThumbnailRequestPrivate *r_priv = REQUEST_GET_PRIVATE (self);
 	HildonThumbnailFactoryPrivate *f_priv = FACTORY_GET_PRIVATE (r_priv->factory);
-	HildonThumbnailRequest *found = g_hash_table_lookup (f_priv->tasks, r_priv->key);
+	HildonThumbnailRequest *found;
 
 	while (waiting_for_cb)
 		g_main_context_iteration (NULL, FALSE);
 
+	if (!r_priv->key)
+		return;
+
+	found = g_hash_table_lookup (f_priv->tasks, r_priv->key);
+
 	while (found) {
 		g_main_context_iteration (NULL, FALSE);
 		found = g_hash_table_lookup (f_priv->tasks, r_priv->key);


More information about the maemo-commits mailing list