Skip to content

Commit

Permalink
Don't panic when indexing into a batch which doesn't have that index (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored Nov 8, 2022
1 parent 852e39b commit c04d80d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/re_data_store/src/stores/field_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ impl<Time: 'static + Copy + Ord> FieldStore<Time> {
}
BatchOrSplat::Batch(batch) => {
if let Some(index) = instance_index {
let value = batch.get_index(index).expect("Batches should be self-consistent");
time_msgid_index.push((*time, *msg_id));
values.push(value.clone());
if let Some(value) = batch.get_index(index) {
time_msgid_index.push((*time, *msg_id));
values.push(value.clone());
}
} else {
for (_index_hash, _, value) in batch.iter() {
time_msgid_index.push((*time, *msg_id));
Expand Down

0 comments on commit c04d80d

Please sign in to comment.