diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 8701971a4..689c3309a 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -6833,6 +6833,7 @@ flatpak_dir_remote_list_refs (FlatpakDir *self, return TRUE; } +/* Guarantees to return refs which are decomposable. */ static GPtrArray * find_matching_refs (GHashTable *refs, const char *opt_name, @@ -6945,6 +6946,7 @@ find_matching_ref (GHashTable *refs, { char *current_ref = g_ptr_array_index (matched_refs, j); g_auto(GStrv) parts = flatpak_decompose_ref (current_ref, NULL); + g_assert (parts != NULL); if (g_strcmp0 (opt_default_branch, parts[3]) == 0) return g_strdup (current_ref); @@ -6958,6 +6960,7 @@ find_matching_ref (GHashTable *refs, for (j = 0; j < matched_refs->len; j++) { g_auto(GStrv) parts = flatpak_decompose_ref (g_ptr_array_index (matched_refs, j), NULL); + g_assert (parts != NULL); if (j != 0) g_string_append (err, ", ");