Do not spew a critial warning when parsing an invalid URI

This commit is contained in:
Richard Hughes 2017-05-08 19:02:24 +01:00
parent 0293f720bc
commit b0fce88754

View File

@ -607,6 +607,13 @@ fu_util_download_file (FuUtilPrivate *priv,
/* download data */
g_debug ("downloading %s to %s:", uri, fn);
msg = soup_message_new (SOUP_METHOD_GET, uri);
if (msg == NULL) {
g_set_error (error,
FWUPD_ERROR,
FWUPD_ERROR_INVALID_FILE,
"Failed to parse URI %s", uri);
return FALSE;
}
status_code = soup_session_send_message (session, msg);
if (status_code != SOUP_STATUS_OK) {
g_set_error (error,