From b098e6591ab5eacc1b6828304b7e8848dbbfdbec Mon Sep 17 00:00:00 2001 From: oltolm Date: Sun, 7 Dec 2025 15:17:07 +0100 Subject: [PATCH] UI: use FAILED --- src/gui/wxgui/CemuApp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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);