[gnome-software] Do not crash if we fall back to the alternative icon path
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not crash if we fall back to the alternative icon path
- Date: Mon, 28 Oct 2013 16:33:24 +0000 (UTC)
commit 1810d154e6a12af49f16359992972a2da4d690f6
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 28 16:29:45 2013 +0000
Do not crash if we fall back to the alternative icon path
Spotted by clang.
src/plugins/gs-plugin-appstream.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 64fdb75..359a653 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -377,9 +377,11 @@ gs_plugin_refine_item_pixbuf (GsPlugin *plugin, GsApp *app, AppstreamApp *item)
}
gs_app_set_icon (app, icon_path);
ret = gs_app_load_icon (app, &error);
- g_warning ("failed to load cached icon %s: %s",
- icon, error->message);
- g_error_free (error);
+ if (!ret) {
+ g_warning ("failed to load cached icon %s: %s",
+ icon, error->message);
+ g_error_free (error);
+ }
goto out;
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]