diff options
author | Alberto Garcia <agarcia@igalia.com> | 2012-12-15 02:55:45 +0800 |
---|---|---|
committer | Alberto Garcia <agarcia@igalia.com> | 2012-12-15 04:25:16 +0800 |
commit | 05eab03df512dc093183e36dd408a5ab173ec4b8 (patch) | |
tree | 45c5e9af5eec9c19b9bae144606beee5849af255 | |
parent | d4efef1d15b6196df51f1e618cab23084835cf17 (diff) | |
download | gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.tar gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.tar.gz gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.tar.bz2 gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.tar.lz gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.tar.xz gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.tar.zst gsoc2013-epiphany-05eab03df512dc093183e36dd408a5ab173ec4b8.zip |
ephy-removable-pixbuf-renderer: don't crash if no close icon is found
https://bugzilla.gnome.org/show_bug.cgi?id=690216
-rw-r--r-- | 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 c0199ebb7..b88b900c6 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 * |