]> spindle.queued.net Git - midori/commitdiff
Only set the proxy icon of the View if we have an item
authorChristian Dywan <christian@twotoasts.de>
Sat, 10 Jan 2009 19:18:26 +0000 (20:18 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 10 Jan 2009 19:18:26 +0000 (20:18 +0100)
midori/midori-view.c

index b85c79c92fcd4d4c79a20cb5d6e32e17310e7a3f..5d035569f9df243edfe9d5cd8a1ac79d82b7c5b4 100644 (file)
@@ -461,12 +461,13 @@ midori_view_update_icon (MidoriView* view,
         if (!icon && parts)
             icon = midori_view_mime_icon (icon_theme, "gnome-mime-%s-x-generic",
                                           parts[0], NULL, &icon_name);
-        katze_item_set_icon (view->item, icon && view->item ? icon_name : NULL);
+        if (view->item)
+            katze_item_set_icon (view->item, icon ? icon_name : NULL);
         if (!icon)
             icon = gtk_widget_render_icon (GTK_WIDGET (view),
                 GTK_STOCK_FILE, GTK_ICON_SIZE_MENU, NULL);
     }
-    else
+    else if (view->item)
         katze_item_set_icon (view->item, NULL);
     katze_object_assign (view->icon, icon);
     g_object_notify (G_OBJECT (view), "icon");