Updating branch refs/heads/master
         to ba3fbaf1d8ff59bb5a870eee27f9222cdcf3f6ef (commit)
       from f609dccf3ae0e44f609d2b7bb36ef72ee109f876 (commit)

commit ba3fbaf1d8ff59bb5a870eee27f9222cdcf3f6ef
Author: Nick Schermer <n...@xfce.org>
Date:   Sun May 5 12:15:58 2013 +0200

    Don't recalculate the length of the array.
    
    Instead check the object.

 tumblerd/tumbler-registry.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tumblerd/tumbler-registry.c b/tumblerd/tumbler-registry.c
index 1a2e02b..dabfb92 100644
--- a/tumblerd/tumbler-registry.c
+++ b/tumblerd/tumbler-registry.c
@@ -453,14 +453,14 @@ tumbler_registry_get_thumbnailer_array (TumblerRegistry   
 *registry,
   g_return_val_if_fail (TUMBLER_IS_REGISTRY (registry), NULL);
   g_return_val_if_fail (infos != NULL, NULL);
 
-  for (length = 0; infos != NULL && infos[length] != NULL; ++length);
-
   /* allocate the thumbnailer array */
   thumbnailers = g_new0 (TumblerThumbnailer *, length + 1);
 
   /* iterate over all URIs */
   for (n = 0; n < length; ++n)
     {
+      g_assert (TUMBLER_IS_FILE_INFO (infos[n]));
+
       tumbler_mutex_lock (registry->mutex);
 
       /* reset */
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to