UESaveFile: add a few sanity things.

This commit is contained in:
Guillaume Jacquemin 2021-09-27 16:16:47 +02:00
parent 0c257bcfa6
commit 911e18fc0a

View file

@ -40,6 +40,7 @@ auto UESaveFile::lastError() const -> const std::string& {
auto UESaveFile::reloadData() -> bool {
if(_noReloadAfterSave) {
_noReloadAfterSave = false;
return valid();
}
@ -211,8 +212,11 @@ void UESaveFile::loadData() {
}
if(_properties.back()->name != "None" && _properties.back()->propertyType != "NoneProperty") {
_lastError = "Couldn't find a final NoneProperty.";
return;
}
reader.closeFile();
_valid = true;
}