diff --git a/ugc/storage.cpp b/ugc/storage.cpp index 7ef47d9b97..f602560c21 100644 --- a/ugc/storage.cpp +++ b/ugc/storage.cpp @@ -127,7 +127,6 @@ Storage::SettingResult SetGenericUGCUpdate( { FileWriter w(ugcFilePath, FileWriter::Op::OP_APPEND); Serialize(w, ugc, version); - indexes.emplace_back(move(index)); } catch (FileWriter::Exception const & exception) { @@ -135,6 +134,7 @@ Storage::SettingResult SetGenericUGCUpdate( return Storage::SettingResult::WritingError; } + indexes.emplace_back(move(index)); return Storage::SettingResult::Success; } } // namespace