summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index e99d8bae26..b8ce6a76c4 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -484,6 +484,9 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
}
void ResumptionDataJson::Persist() {
+ // We lock the resumption data because SaveStateToFileSystem accesses
+ // the same dictionary that we use here in ResumptionDataJson
+ sync_primitives::AutoLock autolock(resumption_lock_);
last_state().SaveStateToFileSystem();
}