| Index: chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
|
| diff --git a/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm b/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
|
| index 390b8f9e2929755a60e0ad6cc67ac3d2b2b5fc13..3fcba52f3de804ede864461012e431a7d59222f2 100644
|
| --- a/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
|
| +++ b/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
|
| @@ -19,8 +19,14 @@ NSImage* FaviconForTabContents(TabContents* contents) {
|
| // favicon.
|
| if (contents && contents->FaviconIsValid()) {
|
| CGColorSpaceRef color_space = base::mac::GetSystemColorSpace();
|
| - return gfx::SkBitmapToNSImageWithColorSpace(contents->GetFavicon(),
|
| - color_space);
|
| + NSImage* image =
|
| + gfx::SkBitmapToNSImageWithColorSpace(contents->GetFavicon(),
|
| + color_space);
|
| + // The |image| could be nil if the bitmap is null. In that case, fallback
|
| + // to the default image.
|
| + if (image) {
|
| + return image;
|
| + }
|
| }
|
|
|
| return app::mac::GetCachedImageWithName(@"nav.pdf");
|
|
|