summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
index f5077d4826..3afa2f040c 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
@@ -95,10 +95,11 @@ void GetInteriorVehicleDataRequest::FilterDisabledModuleData(
// message.
if (module_data.keyExists(message_params::kRadioEnable) &&
module_data[message_params::kRadioEnable].asBool() == false) {
- for (auto data = module_data.map_begin(); data != module_data.map_end();
- ++data) {
- if (data->first != message_params::kRadioEnable) {
- module_data.erase(data->first);
+ for (auto data = module_data.map_begin(); data != module_data.map_end();) {
+ auto key = data->first;
+ ++data;
+ if (key != message_params::kRadioEnable) {
+ module_data.erase(key);
}
}
}