aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/e-icon-factory.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 411deead24..4f4b8d3a40 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -100,14 +100,24 @@ e_icon_factory_get_icon (const gchar *icon_name,
icon_theme = gtk_icon_theme_get_default ();
if (!gtk_icon_size_lookup (icon_size, &width, &height))
- return NULL;
+ width = height = 16;
pixbuf = gtk_icon_theme_load_icon (
icon_theme, icon_name, height, 0, &error);
if (error != NULL) {
g_warning ("%s", error->message);
- g_error_free (error);
+ g_clear_error (&error);
+
+ /* Fallback to missing image */
+ pixbuf = gtk_icon_theme_load_icon (
+ icon_theme, GTK_STOCK_MISSING_IMAGE,
+ height, 0, &error);
+
+ if (error != NULL) {
+ g_error ("%s", error->message);
+ g_clear_error (&error);
+ }
}
return pixbuf;