[gnome-software/wip/hughsie/pkgname] Do not show a crazy error when installing packages



commit 974ca6b03978b3985083196f1931617cdb630ea5
Author: Richard Hughes <richard hughsie com>
Date:   Tue Nov 5 16:43:16 2019 +0000

    Do not show a crazy error when installing packages
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/750

 plugins/core/gs-appstream.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 5b4dc5cf..c91584a0 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -1348,6 +1348,10 @@ gs_appstream_add_alternates (GsPlugin *plugin,
        g_autoptr(GPtrArray) ids = NULL;
        g_autoptr(GString) xpath = g_string_new (NULL);
 
+       /* probably a package we know nothing about */
+       if (gs_app_get_id (app) == NULL)
+               return TRUE;
+
        /* actual ID */
        xb_string_append_union (xpath, "components/component/id[text()='%s']",
                                gs_app_get_id (app));


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