summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-04-18 16:14:29 +0100
committerRichard Hughes <richard@hughsie.com>2018-04-18 16:14:36 +0100
commit549aae3a654152b68756648b2aee227ac8ae0f09 (patch)
tree409c62f26cea221f86604a513968ca97cf61f6ea
parentd9e65e88a7df614948d5ae620adb6b258a489efe (diff)
downloadappstream-glib-549aae3a654152b68756648b2aee227ac8ae0f09.tar.gz
trivial: Do not show a critical warning using appstream-compose on an unknown ID
-rw-r--r--client/as-compose.c9
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,