[epiphany] ephy-removable-pixbuf-renderer: don't crash if no close icon is found
- From: Alberto Garcia <agarcia src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-removable-pixbuf-renderer: don't crash if no close icon is found
- Date: Fri, 14 Dec 2012 20:26:09 +0000 (UTC)
commit 05eab03df512dc093183e36dd408a5ab173ec4b8
Author: Alberto Garcia <agarcia igalia com>
Date: Fri Dec 14 19:55:45 2012 +0100
ephy-removable-pixbuf-renderer: don't crash if no close icon is found
https://bugzilla.gnome.org/show_bug.cgi?id=690216
lib/widgets/ephy-removable-pixbuf-renderer.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/lib/widgets/ephy-removable-pixbuf-renderer.c b/lib/widgets/ephy-removable-pixbuf-renderer.c
index c0199eb..b88b900 100644
--- a/lib/widgets/ephy-removable-pixbuf-renderer.c
+++ b/lib/widgets/ephy-removable-pixbuf-renderer.c
@@ -219,6 +219,7 @@ static void
ephy_removable_pixbuf_renderer_init (EphyRemovablePixbufRenderer *self)
{
GtkIconTheme *icon_theme;
+ GError *error = NULL;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EPHY_TYPE_REMOVABLE_PIXBUF_RENDERER,
EphyRemovablePixbufRendererPrivate);
@@ -226,7 +227,14 @@ ephy_removable_pixbuf_renderer_init (EphyRemovablePixbufRenderer *self)
icon_theme = gtk_icon_theme_get_default ();
self->priv->close_icon = gtk_icon_theme_load_icon (icon_theme,
"window-close-symbolic",
- 24, 0, NULL);
+ 24, 0, &error);
+
+ if (error != NULL) {
+ self->priv->close_icon = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 24, 24);
+ gdk_pixbuf_fill (self->priv->close_icon, 0);
+ g_warning ("%s(): %s", G_STRFUNC, error->message);
+ g_error_free (error);
+ }
}
GtkCellRenderer *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]