Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index daffdc378be00d603ae285b97a9bf9b89e2e390a..8cbf3721833f4af379c0454dbf93e4afdb5e28fe 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -559,8 +559,10 @@ SkBitmap Browser::GetCurrentPageIcon() const { |
// |contents| can be NULL since GetCurrentPageIcon() is called by the window |
// during the window's creation (before tabs have been added). |
// TODO: Let this return a gfx::Image. |
- return contents ? |
- contents->favicon_tab_helper()->GetFavicon().AsBitmap() : SkBitmap(); |
+ if (!contents) |
+ return SkBitmap(); |
+ const gfx::Image& icon = contents->favicon_tab_helper()->GetFavicon(); |
+ return icon.IsEmpty() ? SkBitmap() : *icon.ToSkBitmap(); |
} |
string16 Browser::GetWindowTitleForCurrentTab() const { |