diff options
author | Richard Hughes <richard@hughsie.com> | 2017-06-01 08:49:24 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-06-01 08:58:57 +0100 |
commit | c47660f2f8ece972f4f6dbbb19700a522b2fe791 (patch) | |
tree | 4da074507ddde9c70f55fafe5bc5c4a8fff6f3dc | |
parent | 1646993195b2fcf1efdccfdcc437d7d808293528 (diff) | |
download | appstream-glib-c47660f2f8ece972f4f6dbbb19700a522b2fe791.tar.gz |
trivial: Prevent crash when a sanity check fails
-rw-r--r-- | libappstream-glib/as-store.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c index 7ff5d4b..57b5960 100644 --- a/libappstream-glib/as-store.c +++ b/libappstream-glib/as-store.c @@ -1159,10 +1159,12 @@ as_store_add_app (AsStore *store, AsApp *app) if (app_format == NULL) { g_warning ("no format specified in %s", as_app_get_unique_id (app)); + return; } if (item_format == NULL) { g_warning ("no format specified in %s", as_app_get_unique_id (item)); + return; } /* the previously stored app is what we actually want */ |