[gnome-software] trivial: Fix 'make check' after recent flatpak commit



commit 80f4a258ade79a46961c8895ab4bf9c927e8355a
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jun 1 14:07:21 2016 +0100

    trivial: Fix 'make check' after recent flatpak commit

 src/gs-self-test.c                     |    2 +-
 src/plugins/gs-plugin-flatpak-system.c |    4 ++--
 src/plugins/gs-plugin-flatpak-user.c   |    3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index e9aa0fa..f981ddf 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -859,7 +859,7 @@ main (int argc, char **argv)
                "dpkg",
                "dummy",
                "epiphany",
-               "flatpak",
+               "flatpak-user",
                "fwupd",
                "hardcoded-blacklist",
                "icons",
diff --git a/src/plugins/gs-plugin-flatpak-system.c b/src/plugins/gs-plugin-flatpak-system.c
index f85dbc3..14a42e7 100644
--- a/src/plugins/gs-plugin-flatpak-system.c
+++ b/src/plugins/gs-plugin-flatpak-system.c
@@ -59,8 +59,8 @@ gs_plugin_destroy (GsPlugin *plugin)
 void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
-       if (g_str_has_prefix (gs_app_get_id (app),
-                             GS_FLATPAK_SYSTEM_PREFIX ":")) {
+       const gchar *id = gs_app_get_id (app);
+       if (id != NULL && g_str_has_prefix (id, GS_FLATPAK_SYSTEM_PREFIX ":")) {
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        }
 }
diff --git a/src/plugins/gs-plugin-flatpak-user.c b/src/plugins/gs-plugin-flatpak-user.c
index bc4a50c..aa8251f 100644
--- a/src/plugins/gs-plugin-flatpak-user.c
+++ b/src/plugins/gs-plugin-flatpak-user.c
@@ -59,7 +59,8 @@ gs_plugin_destroy (GsPlugin *plugin)
 void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
-       if (g_str_has_prefix (gs_app_get_id (app), GS_FLATPAK_USER_PREFIX ":")) {
+       const gchar *id = gs_app_get_id (app);
+       if (id != NULL && g_str_has_prefix (id, GS_FLATPAK_USER_PREFIX ":")) {
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        }
 }


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