From ff17210b46e0731eec64e8005f7beb657ab310ee Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 18 Apr 2018 16:14:29 +0100 Subject: trivial: Do not show a critical warning using appstream-compose on an unknown ID --- client/as-compose.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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, -- cgit v1.2.1