Skip to content

Commit 17f22ad

Browse files
committed
don't panic on empty positions
1 parent 3cfb15f commit 17f22ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/bevy_mesh/src/mesh.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,6 +2156,7 @@ impl Mesh {
21562156
}) = attributes
21572157
.as_ref_option()?
21582158
.and_then(|attrs| attrs.get(&Self::ATTRIBUTE_POSITION.id))
2159+
&& !position_values.is_empty()
21592160
{
21602161
let mut iter = position_values.iter().map(|p| Vec3::from_slice(p));
21612162
let mut min = iter.next().unwrap();

0 commit comments

Comments
 (0)