]> spindle.queued.net Git - midori/commitdiff
Only copy icon_uri when needed in _midori_web_view_load_icon
authorChristian Dywan <christian@twotoasts.de>
Tue, 13 Dec 2011 22:28:35 +0000 (23:28 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 13 Dec 2011 23:03:02 +0000 (00:03 +0100)
midori/midori-view.c

index 167b5c706148642a0bdb02db1f6b0f0e8a6deb32..2d3c3338eb7e02f9213942b1157988a91faebd94 100644 (file)
@@ -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;