Fix crash on pattern load (#319)
This commit is contained in:
parent
2dc1886ee9
commit
21769886fc
@ -191,6 +191,8 @@ namespace hex {
|
|||||||
this->m_possiblePatternFiles.clear();
|
this->m_possiblePatternFiles.clear();
|
||||||
|
|
||||||
for (auto &imhexPath : hex::getPath(ImHexPath::Patterns)) {
|
for (auto &imhexPath : hex::getPath(ImHexPath::Patterns)) {
|
||||||
|
if (!fs::exists(imhexPath)) continue;
|
||||||
|
|
||||||
for (auto &entry: fs::recursive_directory_iterator(imhexPath)) {
|
for (auto &entry: fs::recursive_directory_iterator(imhexPath)) {
|
||||||
if (entry.is_regular_file() && entry.path().extension() == ".hexpat") {
|
if (entry.is_regular_file() && entry.path().extension() == ".hexpat") {
|
||||||
this->m_possiblePatternFiles.push_back(entry.path());
|
this->m_possiblePatternFiles.push_back(entry.path());
|
||||||
|
Loading…
Reference in New Issue
Block a user