mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-21 14:02:05 +08:00
Replay: fix SEGFAULT in buildTimeline if segments are not continuous. (#26691)
fix segfault in buildtimeline
This commit is contained in:
@@ -123,9 +123,9 @@ void Replay::buildTimeline() {
|
||||
uint64_t alert_begin = 0;
|
||||
TimelineType alert_type = TimelineType::None;
|
||||
|
||||
for (int i = 0; i < segments_.size() && !exit_; ++i) {
|
||||
for (auto it = segments_.cbegin(); it != segments_.cend() && !exit_; ++it) {
|
||||
LogReader log;
|
||||
if (!log.load(route_->at(i).qlog.toStdString(), &exit_,
|
||||
if (!log.load(route_->at(it->first).qlog.toStdString(), &exit_,
|
||||
{cereal::Event::Which::CONTROLS_STATE, cereal::Event::Which::USER_FLAG},
|
||||
!hasFlag(REPLAY_FLAG_NO_FILE_CACHE), 0, 3)) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user