Fixed crash when no patterns folder exists

This commit is contained in:
WerWolv 2020-11-23 00:12:33 +01:00
parent 4402120ffc
commit d752c7434f
1 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,8 @@ namespace hex {
preprocessor.addDefaultPragramHandlers();
for (auto &entry : std::filesystem::directory_iterator("patterns")) {
std::error_code errorCode;
for (auto &entry : std::filesystem::directory_iterator("patterns", errorCode)) {
if (!entry.is_regular_file())
continue;