From 4413cdc4b9c7b17b1791f4fc02b94397f0ae7ffd Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Sun, 7 Oct 2018 17:50:27 +0100 Subject: [PATCH 1/2] Ensure all addons are linked to a component --- src/as-pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/as-pool.c b/src/as-pool.c index 93f6e023..0828d074 100644 --- a/src/as-pool.c +++ b/src/as-pool.c @@ -486,7 +486,7 @@ as_pool_update_addon_info (AsPool *pool, AsComponent *cpt) } /* don't act if we already have addons */ - if (as_component_get_addons (extended_cpt)->len > 0) + if (g_ptr_array_find (as_component_get_addons (extended_cpt), cpt, NULL)) continue; as_component_add_addon (extended_cpt, cpt); From 7388640f649ded9f72967304f60b51c51895ab62 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Sun, 7 Oct 2018 17:51:23 +0100 Subject: [PATCH 2/2] Update comment --- src/as-pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/as-pool.c b/src/as-pool.c index 0828d074..4af3644d 100644 --- a/src/as-pool.c +++ b/src/as-pool.c @@ -485,7 +485,7 @@ as_pool_update_addon_info (AsPool *pool, AsComponent *cpt) return; } - /* don't act if we already have addons */ + /* don't add the same addon more than once */ if (g_ptr_array_find (as_component_get_addons (extended_cpt), cpt, NULL)) continue;