[gnome-software/gnome-3-24] flatpak: Fix use of uninitialized variable



commit 0a259fa114ed26564657691dac8674c1fa470e5f
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed May 10 10:11:15 2017 +1200

    flatpak: Fix use of uninitialized variable

 plugins/flatpak/gs-flatpak.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index aa7c562..9e21113 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -249,6 +249,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
        }
 
        /* add the origin as a keyword */
+       apps = as_store_get_apps (store);
        for (i = 0; i < apps->len; i++) {
                AsApp *app = g_ptr_array_index (apps, i);
                g_debug ("adding keyword '%s' to %s",
@@ -274,7 +275,6 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
                default_branch = flatpak_remote_get_default_branch (xremote);
 
        /* get all the apps and fix them up */
-       apps = as_store_get_apps (store);
        app_filtered = g_ptr_array_new ();
        for (i = 0; i < apps->len; i++) {
                AsApp *app = g_ptr_array_index (apps, i);


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