| Index: chrome/browser/ui/cocoa/tab_contents/favicon_util.mm
|
| ===================================================================
|
| --- chrome/browser/ui/cocoa/tab_contents/favicon_util.mm (revision 83060)
|
| +++ chrome/browser/ui/cocoa/tab_contents/favicon_util.mm (working copy)
|
| @@ -19,8 +19,14 @@
|
| // 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");
|
|
|