mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-06 04:48:47 -04:00
repair: Don't crash if no remotes are configured
If no remotes are configured, ostree_repo_remote_list returns NULL so don't dereference it. Fixes: https://github.com/flatpak/flatpak/issues/3436
This commit is contained in:
1 parent
b79e878a75
commit
e2ee3306b7
1 file changed
+1
-1
@@ -15140,7 +15140,7 @@ flatpak_dir_delete_mirror_refs (FlatpakDir *self,
|
||||
* OS updates which Flatpak shouldn't touch.
|
||||
*/
|
||||
remotes = ostree_repo_remote_list (repo, NULL);
|
||||
for (i = 0; remotes[i] != NULL; i++)
|
||||
for (i = 0; remotes != NULL && remotes[i] != NULL; i++)
|
||||
{
|
||||
g_autofree char *remote_collection_id = NULL;
|
||||
|
||||
|
||||
Reference in new issue
Block a user