diff --git a/source/views/view_pattern_editor.cpp b/source/views/view_pattern_editor.cpp index 7526c848e..ff39d7552 100644 --- a/source/views/view_pattern_editor.cpp +++ b/source/views/view_pattern_editor.cpp @@ -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 { } -} \ No newline at end of file +}