diff --git a/src/gui/wxgui/CemuApp.cpp b/src/gui/wxgui/CemuApp.cpp index 17900819..1c803bf6 100644 --- a/src/gui/wxgui/CemuApp.cpp +++ b/src/gui/wxgui/CemuApp.cpp @@ -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);