diff --git a/src/bin/perfdhcp/avalanche_scen.cc b/src/bin/perfdhcp/avalanche_scen.cc index a4b187869a..376952c35f 100644 --- a/src/bin/perfdhcp/avalanche_scen.cc +++ b/src/bin/perfdhcp/avalanche_scen.cc @@ -44,9 +44,10 @@ AvalancheScen::resendPackets(ExchangeType xchg_type) { auto start_time = pkt->getTimestamp(); int current_pkt_resent_cnt = 0; auto r_it = retrans.find(trans_id); - if (r_it != retrans.end()) { - start_time = (*start_times.find(trans_id)).second; - current_pkt_resent_cnt = (*r_it).second; + auto s_it = start_times.find(trans_id); + if (r_it != retrans.end() && s_it != start_times.end()) { + start_time = s_it->second; + current_pkt_resent_cnt = r_it->second; } else { start_times[trans_id] = start_time; }