Skip to content

Commit ddac532

Browse files
committed
?
1 parent 3bef0c0 commit ddac532

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/config.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ void SaveConfig(const std::string &filename) {
315315

316316
Config LoadConfig(const std::string &filename) {
317317
const auto path = ConfigPath() / filename;
318+
if (!std::filesystem::exists(path)) {
319+
logging::Warning("config file invalid, loading defaults");
320+
return {};
321+
}
318322
std::ifstream file(path);
319323
if (!file.good()) {
320324
logging::Warning("config file invalid, loading defaults");

0 commit comments

Comments
 (0)