diff --git a/modules/EvManager/main/car_simulation.cpp b/modules/EvManager/main/car_simulation.cpp index 85da5ee75..79c041e92 100644 --- a/modules/EvManager/main/car_simulation.cpp +++ b/modules/EvManager/main/car_simulation.cpp @@ -21,7 +21,9 @@ void CarSimulation::state_machine() { // Wait for physical plugin (ev BSP sees state A on CP and not Disconnected) sim_data.slac_state = "UNMATCHED"; - r_ev[0]->call_stop_charging(); + if (!r_ev.empty()) { + r_ev[0]->call_stop_charging(); + } } break; case SimState::PLUGGED_IN: