aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index 0a45af31e..b360fb40d 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -896,7 +896,7 @@ window_cmd_help_about (GtkAction *action,
GtkWidget** ptr;
GdkPixbuf *icon;
const char *icon_path;
- GdkPixbuf *logo;
+ GdkPixbuf *logo = NULL;
GtkIconTheme *icon_theme;
GtkIconInfo *icon_info;
@@ -924,25 +924,24 @@ window_cmd_help_about (GtkAction *action,
return;
}
+ /* FIXME: use the icon theme for the correct screen, not for the default screen */
icon_theme = gtk_icon_theme_get_default ();
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "web-browser", -1, 0);
if (icon_info)
{
-
icon_path = gtk_icon_info_get_filename (icon_info);
- g_return_if_fail (icon_path != NULL);
- logo = gdk_pixbuf_new_from_file (icon_path, NULL);
+ if (icon_path != NULL)
+ {
+ logo = gdk_pixbuf_new_from_file (icon_path, NULL);
+ }
}
else
{
- logo = NULL;
g_warning ("Web browser gnome icon not found");
}
- g_object_unref (icon_theme);
-
about = gnome_about_new(
"Epiphany", VERSION,
"Copyright \xc2\xa9 2002-2003 Marco Pesenti Gritti",
@@ -952,7 +951,10 @@ window_cmd_help_about (GtkAction *action,
strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
logo);
- g_object_unref (logo);
+ if (logo != NULL)
+ {
+ g_object_unref (logo);
+ }
gtk_window_set_transient_for (GTK_WINDOW (about),
GTK_WINDOW (window));