More boring fixups

This commit is contained in:
Paul Betts 2016-03-09 11:27:16 -08:00 committed by Cheng Zhao
parent 1c01e4955f
commit f4ec369873
5 changed files with 7 additions and 8 deletions

View file

@ -158,11 +158,11 @@ bool ReadImageSkiaFromICO(gfx::ImageSkia* image, const base::FilePath& path) {
base::win::ScopedHICON icon(static_cast<HICON>(
LoadImage(NULL, image_path.value().c_str(), IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_LOADFROMFILE)));
if (!icon)
if (!icon.get())
return false;
// Convert the icon from the Windows specific HICON to gfx::ImageSkia.
scoped_ptr<SkBitmap> bitmap(IconUtil::CreateSkBitmapFromHICON(icon));
scoped_ptr<SkBitmap> bitmap(IconUtil:: CreateSkBitmapFromHICON(icon.get()));
image->AddRepresentation(gfx::ImageSkiaRep(*bitmap, 1.0f));
return true;
}