[gnome-software/1644-opening-software-repositories-window-causes-software-to-crash-when-started-with] gs-fedora-third-party: Let the 'list' call fail only when the call itself failed




commit c416f94b1fded4ad43c4159f6d7bdf474f0e5027
Author: Milan Crha <mcrha redhat com>
Date:   Wed Feb 16 11:33:24 2022 +0100

    gs-fedora-third-party: Let the 'list' call fail only when the call itself failed
    
    Like with other functions, let it fail only if a call to the 'fedora-third-party'
    really failed. It's not a problem when no repo is configured.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1644

 lib/gs-fedora-third-party.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/gs-fedora-third-party.c b/lib/gs-fedora-third-party.c
index 98f16e70c..19060fd5e 100644
--- a/lib/gs-fedora-third-party.c
+++ b/lib/gs-fedora-third-party.c
@@ -465,7 +465,7 @@ gs_fedora_third_party_list_sync (GsFedoraThirdParty *self,
                }
                self->last_update = g_get_real_time () / G_USEC_PER_SEC;
        }
-       success = self->repos != NULL && g_hash_table_size (self->repos) != 0;
+       success = self->repos != NULL;
        if (success && out_repos)
                *out_repos = g_hash_table_ref (self->repos);
        g_mutex_unlock (&self->lock);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]