[gnome-software] Don't issue a critical warning for invalid URIs in the metadata



commit 2033938095d7eb449b744fb356393ff59942f7a9
Author: Richard Hughes <richard hughsie com>
Date:   Tue Oct 21 11:44:29 2014 +0100

    Don't issue a critical warning for invalid URIs in the metadata

 src/plugins/gs-plugin-epiphany.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-epiphany.c b/src/plugins/gs-plugin-epiphany.c
index 31f7295..d9b6234 100644
--- a/src/plugins/gs-plugin-epiphany.c
+++ b/src/plugins/gs-plugin-epiphany.c
@@ -554,6 +554,14 @@ gs_plugin_epiphany_download (GsPlugin *plugin, const gchar *uri, const gchar *fi
 
        /* create the GET data */
        msg = soup_message_new (SOUP_METHOD_GET, uri);
+       if (msg == NULL) {
+               ret = FALSE;
+               g_set_error (error,
+                            GS_PLUGIN_ERROR,
+                            GS_PLUGIN_ERROR_FAILED,
+                            "%s is not a valid URL", uri);
+               goto out;
+       }
 
        /* ensure networking is set up */
        ret = gs_plugin_setup_networking (plugin, error);


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