Skip to content

Commit 3cfb15f

Browse files
committed
don't fail on missing positions in Mesh::take_gpu_data
1 parent 59f7dcd commit 3cfb15f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/bevy_mesh/src/mesh.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,9 @@ impl Mesh {
21532153
if let Some(MeshAttributeData {
21542154
values: VertexAttributeValues::Float32x3(position_values),
21552155
..
2156-
}) = attributes.as_ref()?.get(&Self::ATTRIBUTE_POSITION.id)
2156+
}) = attributes
2157+
.as_ref_option()?
2158+
.and_then(|attrs| attrs.get(&Self::ATTRIBUTE_POSITION.id))
21572159
{
21582160
let mut iter = position_values.iter().map(|p| Vec3::from_slice(p));
21592161
let mut min = iter.next().unwrap();

0 commit comments

Comments
 (0)