fix(Globals): Don't forget to close file handle

This commit is contained in:
Yimura 2021-12-24 01:58:56 +01:00
parent 0564af724e
commit 9821a28e10
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682

View File

@ -309,9 +309,13 @@ struct globals {
try try
{ {
file >> this->options; file >> this->options;
file.close();
} }
catch (const std::exception&) catch (const std::exception&)
{ {
file.close();
LOG(WARNING) << "Detected corrupt settings, writing default config..."; LOG(WARNING) << "Detected corrupt settings, writing default config...";
this->write_default_config(); this->write_default_config();