diff --git a/services/samgr/native/source/system_ability_manager.cpp b/services/samgr/native/source/system_ability_manager.cpp index 8b8fa6298c297f11c49adfb3023f5b89d218c14f..62c6e153009aa41d6fbff7246c058c9211918bdf 100644 --- a/services/samgr/native/source/system_ability_manager.cpp +++ b/services/samgr/native/source/system_ability_manager.cpp @@ -932,7 +932,7 @@ void SystemAbilityManager::OnAbilityCallbackDied(const sptr& remo AbilityItem& abilityItem = iter->second; RemoveStartingAbilityCallback(abilityItem, remoteObject); if (abilityItem.callbackList.empty()) { - iter = startingAbilityMap_.erase(iter); + startingAbilityMap_.erase(iter++); } else { ++iter; }