Commit 5620c869 authored by Adrien Plazas's avatar Adrien Plazas
Browse files

app-list: Ensure we dedupe app objects

This works around an issue assumed to come from appstream-glib feeding
us twice with the same app object by deduplicating app objects with the
same address.

Fixes #8
parent 89651363
......@@ -824,8 +824,10 @@ gs_app_list_filter_duplicates (GsAppList *list, GsAppListFilterFlags flags)
/* add back the apps we want to keep */
for (guint i = 0; i < old->array->len; i++) {
GsApp *app = gs_app_list_index (old, i);
if (g_hash_table_contains (kept_apps, app))
if (g_hash_table_contains (kept_apps, app)) {
gs_app_list_add_safe (list, app, GS_APP_LIST_ADD_FLAG_NONE);
g_hash_table_remove (kept_apps, app);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment