forked from mia/Aegisub
Skip over invalid entries in the MRU file rather than crashing on startup
Originally committed to SVN as r5670.
This commit is contained in:
parent
c328bdfa5f
commit
34a7f16214
1 changed files with 6 additions and 1 deletions
|
@ -120,7 +120,12 @@ static json::String cast_str(json::UnknownElement const& e) {
|
|||
/// @param key List name.
|
||||
/// @param array json::Array of values.
|
||||
void MRUManager::Load(const std::string &key, const json::Array& array) {
|
||||
try {
|
||||
transform(array.Begin(), array.End(), back_inserter(mru[key]), cast_str);
|
||||
}
|
||||
catch (json::Exception const&) {
|
||||
// Out of date MRU file; just discard the data and skip it
|
||||
}
|
||||
Prune(mru[key]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue