Skip to content

Commit

Permalink
fix crash when no config.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fesily committed Feb 6, 2025
1 parent df0ca64 commit 3717240
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DontStarveInjector/luajit_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ std::optional<luajit_config> luajit_config::read_from_file(std::filesystem::path
}
path = path / "luajit_config.json";
}
if (!std::filesystem::exists(path))
return std::nullopt;
std::ifstream sf(path.string().c_str());
if (!sf.is_open())
return std::nullopt;
Expand Down

0 comments on commit 3717240

Please sign in to comment.