FIX: gui: fix a crash issue of ams sync

jira: no-jira
Change-Id: I1f33d20f11add12929eb6183387eaac8639698e8
(cherry picked from commit 8c4f2634c9514ceca279ab49f7ccde58e3b06a9a)
This commit is contained in:
lane.wei
2025-02-15 13:37:14 +08:00
committed by Noisyfox
parent 4ce8403888
commit 8456b8381b
2 changed files with 4 additions and 4 deletions

View File

@@ -293,8 +293,8 @@ void SyncAmsInfoDialog::deal_ok()
m_result.sync_maps.clear();
for (size_t i = 0; i < m_ams_mapping_result.size(); i++) {
auto temp_idx = m_ams_mapping_result[i].id;
if (temp_idx >= 0 && temp_idx < m_result.sync_maps.size()) {
auto &temp = m_result.sync_maps[m_ams_mapping_result[i].id];
if (temp_idx >= 0) {
auto &temp = m_result.sync_maps[temp_idx];
temp.ams_id = m_ams_mapping_result[i].ams_id;
temp.slot_id = m_ams_mapping_result[i].slot_id;
}