!SetWallpaper: Added file check.

This commit is contained in:
spx 2012-02-04 16:51:14 +00:00
parent 34effcfba0
commit 30ea472c51

View File

@ -1239,6 +1239,12 @@ void CSystem::SetWallpaper(const std::wstring& wallpaper, const std::wstring& st
if (!wallpaper.empty())
{
if (_waccess(wallpaper.c_str(), 0) == -1)
{
LogWithArgs(LOG_ERROR, L"!SetWallpaper: Unable to read file: %s", wallpaper.c_str());
return;
}
if (GetOSPlatform() < OSPLATFORM_7)
{
// Gotta convert to .bmp for pre-7