summaryrefslogtreecommitdiff
path: root/tumblerd/tumbler-registry.c
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2013-05-05 12:15:58 +0200
committerNick Schermer <nick@xfce.org>2013-05-05 12:16:56 +0200
commitba3fbaf1d8ff59bb5a870eee27f9222cdcf3f6ef (patch)
tree902790746dcb5dd3a9f74492101fdb5655a59f8d /tumblerd/tumbler-registry.c
parentf609dccf3ae0e44f609d2b7bb36ef72ee109f876 (diff)
downloadtumbler-ba3fbaf1d8ff59bb5a870eee27f9222cdcf3f6ef.tar.gz
Don't recalculate the length of the array.
Instead check the object.
Diffstat (limited to 'tumblerd/tumbler-registry.c')
-rw-r--r--tumblerd/tumbler-registry.c4
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 */