Skip to content

Commit

Permalink
check framereader!=null
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Sep 28, 2021
1 parent 9fc2982 commit fa0ac99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion selfdrive/ui/replay/logreader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool LogReader::load(const std::string &file) {
}
}

// insert custom eidx events for publish frames.
// insert custom EncodeIdx events for publish frames.
for (auto cam : ALL_CAMERAS) {
for (auto [frame_id, val] : eidx_map[cam]) {
auto [e, eidx] = val;
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/ui/replay/replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void Replay::stream() {
if (evt->which == cereal::Event::ROAD_ENCODE_IDX) {
auto idx = evt->event.getRoadEncodeIdx();
auto &seg = segments_[idx.getSegmentNum()];
if (seg && seg->isLoaded()) {
if (seg && seg->isLoaded() && seg->frames[RoadCam]) {
auto &frm = seg->frames[RoadCam];
if (vipc_server == nullptr) {
cl_device_id device_id = cl_get_device_id(CL_DEVICE_TYPE_DEFAULT);
Expand Down

0 comments on commit fa0ac99

Please sign in to comment.