[gnome-software/gnome-3-34] Do not show a crazy error when installing packages



commit f21b2efc4b261f76e276eb514fa8b73962d41ac9
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 7647157e..40e6f2b2 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -1344,6 +1344,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]