summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-05-24 12:01:04 +0100
committerRichard Hughes <richard@hughsie.com>2018-05-24 12:01:04 +0100
commit9e185aac3540fb6b311cdc89c150f7d657abf113 (patch)
tree63401c9c186ff647c17ba48e2f4f3528d86f6b52
parent732cc21c51c7ba4d2981626b65dbcc5118180c48 (diff)
downloadappstream-glib-9e185aac3540fb6b311cdc89c150f7d657abf113.tar.gz
trivial: Ignore missing converted cached icons
-rw-r--r--libappstream-builder/asb-app.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libappstream-builder/asb-app.c b/libappstream-builder/asb-app.c
index dba76e8..01b0cf5 100644
--- a/libappstream-builder/asb-app.c
+++ b/libappstream-builder/asb-app.c
@@ -172,21 +172,16 @@ asb_app_save_resources (AsbApp *app, AsbAppSaveFlags save_flags, GError **error)
as_icon_get_kind (icon) == AS_ICON_KIND_REMOTE)
continue;
+ /* missing cached icons */
+ pixbuf = as_icon_get_pixbuf (icon);
+ if (pixbuf == NULL)
+ continue;
+
/* save to disk */
tmpdir = asb_package_get_config (priv->pkg, "IconsDir");
filename = g_build_filename (tmpdir,
as_icon_get_name (icon),
NULL);
- pixbuf = as_icon_get_pixbuf (icon);
- if (pixbuf == NULL) {
- g_set_error (error,
- AS_APP_ERROR,
- AS_APP_ERROR_FAILED,
- "No pixbuf for %s in %s",
- as_icon_get_name (icon),
- as_app_get_id (AS_APP (app)));
- return FALSE;
- }
if (!gdk_pixbuf_save (pixbuf, filename, "png", error, NULL))
return FALSE;