From: Christian Dywan Date: Tue, 13 Dec 2011 22:28:35 +0000 (+0100) Subject: Only copy icon_uri when needed in _midori_web_view_load_icon X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c522706d633ae658f825b8cffc93665318218e99;p=midori Only copy icon_uri when needed in _midori_web_view_load_icon --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 167b5c70..2d3c3338 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -854,17 +854,16 @@ static void _midori_web_view_load_icon (MidoriView* view) { GdkPixbuf* pixbuf; - gchar* icon_uri; gchar* icon_file; gint icon_width, icon_height; GdkPixbuf* pixbuf_scaled; GtkSettings* settings; pixbuf = NULL; - icon_uri = g_strdup (view->icon_uri); - if (midori_uri_is_http (icon_uri) || midori_uri_is_http (view->uri)) + if (midori_uri_is_http (view->icon_uri) || midori_uri_is_http (view->uri)) { + gchar* icon_uri = g_strdup (view->icon_uri); if (!icon_uri) { guint i = 8;