diff options
author | Richard Hughes <richard@hughsie.com> | 2018-04-18 16:14:29 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2018-04-18 18:25:46 +0100 |
commit | ff17210b46e0731eec64e8005f7beb657ab310ee (patch) | |
tree | e1c589ed96c460ed5cbd5b49bdf91659a8ea6ce3 | |
parent | 412a99d2c6ec377d98b3ceb9009ce62fc1d17f5d (diff) | |
download | appstream-glib-ff17210b46e0731eec64e8005f7beb657ab310ee.tar.gz |
trivial: Do not show a critical warning using appstream-compose on an unknown ID
-rw-r--r-- | client/as-compose.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/as-compose.c b/client/as-compose.c index 8526c08..4f2502f 100644 --- a/client/as-compose.c +++ b/client/as-compose.c @@ -271,7 +271,14 @@ load_appdata (const gchar *prefix, const gchar *app_name, GError **error) guint i; appdata_path = get_appdata_filename (prefix, app_name); - g_debug ("Looking for %s", appdata_path); + if (appdata_path == NULL) { + g_set_error (error, + AS_APP_ERROR, + AS_APP_ERROR_FAILED, + "no file found for %s", app_name); + return NULL; + } + g_debug ("looking for %s", appdata_path); app = as_app_new (); if (!as_app_parse_file (app, appdata_path, |