Incorporate FreeBSD fix from @mandree (#5651) plus a little hardening

This commit is contained in:
Flössie
2020-02-14 11:44:57 +01:00
parent 67ca8e2c19
commit 1069c890f5
2 changed files with 5 additions and 4 deletions

View File

@@ -4606,8 +4606,9 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
Glib::ustring temp;
assignFromKeyfile(keyFile, "Wavelet", "LevMethod", pedited, temp, pedited->wavelet.Lmethod);
if (!temp.empty()) {
try {
wavelet.Lmethod = std::stoi(temp);
} catch (...) {
}
} else {
assignFromKeyfile(keyFile, "Wavelet", "LevMethod", pedited, wavelet.Lmethod, pedited->wavelet.Lmethod);