builtins-utils, dir: Be more strict about what is acceptable

The 'arch' parameter of flatpak_dir_remote_fetch_indexed_summary() is
used to construct the names of the caches, and can't be NULL.  This
function is used by flatpak_remote_state_ensure_subsummary(), which is
used by ensure_remote_state_arch().  So, the parameter can't be NULL in
those either.
This commit is contained in:
Debarshi Ray
2026-03-13 23:14:55 +01:00
committed by Sebastian Wick
parent 00f22d406d
commit 70ddf44b40
2 changed files with 4 additions and 0 deletions

View File

@@ -1413,6 +1413,8 @@ ensure_remote_state_arch (FlatpakDir *dir,
{
g_autoptr(GError) local_error = NULL;
g_return_val_if_fail (arch != NULL, FALSE);
if (only_sideloaded)
return TRUE;

View File

@@ -604,6 +604,8 @@ flatpak_remote_state_ensure_subsummary (FlatpakRemoteState *self,
g_autoptr(GBytes) bytes = NULL;
g_return_val_if_fail (arch != NULL, FALSE);
if (self->summary != NULL)
return TRUE; /* We have them all anyway */