mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
Merge pull request #4979 from Sonicadvance1/fix_fexpidof_crash
FEXpidof: Fixes potential crash
This commit is contained in:
1 file changed
+8
-1
@@ -93,7 +93,14 @@ bool FindWineFEXApplication(int64_t PID, std::string_view exe, const std::vector
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto filename = std::filesystem::read_symlink(Entry.path()).filename().string();
|
||||
std::error_code ec {};
|
||||
const auto symlink_path = std::filesystem::read_symlink(Entry.path(), ec);
|
||||
// If error reading symlink then skip.
|
||||
if (ec) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto filename = symlink_path.filename().string();
|
||||
if (filename.find("arm64ecfex.dll") != filename.npos || filename.find("wow64fex.dll") != filename.npos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user