From d752c7434f52e2706c30e49d6048e75dcdd1caaf Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 23 Nov 2020 00:12:33 +0100 Subject: [PATCH] Fixed crash when no patterns folder exists --- source/views/view_pattern.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/views/view_pattern.cpp b/source/views/view_pattern.cpp index 08a4bda7d..2dc7cc14e 100644 --- a/source/views/view_pattern.cpp +++ b/source/views/view_pattern.cpp @@ -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;