Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpp: fix readMessages() for empty file #478

Merged
merged 1 commit into from
Jul 21, 2022
Merged

Conversation

jtbandes
Copy link
Member

Public-Facing Changes
Fixed McapReader::readMessages() so it doesn't produce an invalid reference when reading an empty file.

Description
We do this if (!impl_->has_value()) impl_ = nullptr dance after each LinearMessageView::Iterator::operator++(), but we forgot to do it at the beginning.

@jtbandes jtbandes merged commit 4748e62 into main Jul 21, 2022
@jtbandes jtbandes deleted the jacob/cpp-fix-empty-segfault branch July 21, 2022 18:51
jtbandes added a commit to ros-tooling/rosbag2_storage_mcap that referenced this pull request Jul 22, 2022
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 17, 2022
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 17, 2022
Incorporates fixes from foxglove/mcap#478 and foxglove/mcap#482

Signed-off-by: James Smith <james@foxglove.dev>
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 18, 2022
…e_mcap#42)

Incorporates fixes from foxglove/mcap#478 and foxglove/mcap#482

Signed-off-by: James Smith <james@foxglove.dev>
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants