1
0
mirror of synced 2024-09-27 04:58:26 +02:00

Fix crash on pattern load (#319)

This commit is contained in:
Anton Älgmyr 2021-10-09 17:08:45 +02:00 committed by GitHub
parent 2dc1886ee9
commit 21769886fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,6 +191,8 @@ namespace hex {
this->m_possiblePatternFiles.clear();
for (auto &imhexPath : hex::getPath(ImHexPath::Patterns)) {
if (!fs::exists(imhexPath)) continue;
for (auto &entry: fs::recursive_directory_iterator(imhexPath)) {
if (entry.is_regular_file() && entry.path().extension() == ".hexpat") {
this->m_possiblePatternFiles.push_back(entry.path());
@ -430,4 +432,4 @@ namespace hex {
}
}
}