mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed settings being initialised incorrectly.
If the settings file was missing.
This commit is contained in:
+12
-14
@@ -204,20 +204,18 @@ bool LOOT::OnInit() {
|
||||
return false;
|
||||
}
|
||||
GenerateDefaultSettingsFile(g_path_settings.string());
|
||||
}
|
||||
else {
|
||||
try {
|
||||
loot::ifstream in(g_path_settings);
|
||||
_settings = YAML::Load(in);
|
||||
in.close();
|
||||
} catch (YAML::ParserException& e) {
|
||||
wxMessageBox(
|
||||
FromUTF8(format(loc::translate("Error: Settings parsing failed. %1%")) % e.what()),
|
||||
translate("LOOT: Error"),
|
||||
wxOK | wxICON_ERROR,
|
||||
NULL);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
try {
|
||||
loot::ifstream in(g_path_settings);
|
||||
_settings = YAML::Load(in);
|
||||
in.close();
|
||||
} catch (YAML::ParserException& e) {
|
||||
wxMessageBox(
|
||||
FromUTF8(format(loc::translate("Error: Settings parsing failed. %1%")) % e.what()),
|
||||
translate("LOOT: Error"),
|
||||
wxOK | wxICON_ERROR,
|
||||
NULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Set up logging.
|
||||
|
||||
Reference in New Issue
Block a user