1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Check that the file exists instead of crashing

- It closes issue #15.
This commit is contained in:
Mathieu Schroeter 2017-09-16 22:55:38 +02:00
parent 4ae26a308c
commit eb044e13ca

View File

@ -114,7 +114,10 @@ ReadConfig ()
{
const auto config = GetBaseDir () + "data/config.json";
std::ifstream file (config, std::ifstream::in);
std::ifstream file (config, std::ifstream::in);
if (!file)
return false;
nlohmann::json j;
file >> j;