[gnome-software] snap: Fix warning trying to adopt app without an ID
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Fix warning trying to adopt app without an ID
- Date: Thu, 5 Dec 2019 00:34:26 +0000 (UTC)
commit 02d335393c3bd95831d983a9a9438f3366bcc9d5
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Nov 28 12:50:27 2019 +1300
snap: Fix warning trying to adopt app without an ID
plugins/snap/gs-plugin-snap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 64579310..ece07ae8 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -95,7 +95,7 @@ gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_SNAP)
gs_app_set_management_plugin (app, "snap");
- if (g_str_has_prefix (gs_app_get_id (app), "io.snapcraft.")) {
+ if (gs_app_get_id (app) != NULL && g_str_has_prefix (gs_app_get_id (app), "io.snapcraft.")) {
g_autofree gchar *name_and_id = NULL;
gchar *divider, *snap_name;/*, *id;*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]