static bool LoadThumbnail(DisplayState& ds) { if (ds.thumbnail) delete ds.thumbnail; ds.thumbnail = NULL; ScopedMem<WCHAR> bmpPath(GetThumbnailPath(ds.filePath)); if (!bmpPath) return false; ds.thumbnail = LoadRenderedBitmap(bmpPath); return ds.thumbnail != NULL; }
bool LoadThumbnail(DisplayState& ds) { delete ds.thumbnail; ds.thumbnail = nullptr; AutoFreeW bmpPath(GetThumbnailPath(ds.filePath)); if (!bmpPath) { return false; } RenderedBitmap* bmp = LoadRenderedBitmap(bmpPath); if (!bmp || bmp->Size().IsEmpty()) { delete bmp; return false; } ds.thumbnail = bmp; return true; }