UI: use FAILED

This commit is contained in:
oltolm 2025-12-07 15:17:07 +01:00
parent 9a84b7f749
commit b098e6591a

View File

@ -69,10 +69,9 @@ fs::path GetAppDataRoamingPath()
{
PWSTR path = nullptr;
HRESULT result = SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &path);
if (result != S_OK || !path)
if (FAILED(result))
{
if (path)
CoTaskMemFree(path);
CoTaskMemFree(path);
return {};
}
std::string appDataPath = boost::nowide::narrow(path);