From 9fb41342b35eb6c8539e50d840d21793162a612e Mon Sep 17 00:00:00 2001 From: gsemaj Date: Wed, 5 May 2021 15:44:00 -0400 Subject: [PATCH] Fix server crash if patch folder doesn't exist --- src/TableData.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TableData.cpp b/src/TableData.cpp index b16160a..ebcb5b4 100644 --- a/src/TableData.cpp +++ b/src/TableData.cpp @@ -1145,6 +1145,7 @@ void TableData::init() { fstream.close(); // patching: loop through every directory within the patch directory, looking for a matching file + if (!std::filesystem::exists(settings::PATCHDIR)) continue; // patch dir doesn't exist json patch; for (const auto& patchModule : std::filesystem::directory_iterator(settings::PATCHDIR)) { // this is the theoretical path of a corresponding patch for this file