Skip to content

Commit

Permalink
bevy_pbr: Use clone_weak for material handles
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed May 3, 2022
1 parent a75fa80 commit 1794083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn extract_materials<M: SpecializedMaterial>(
let mut materials = Vec::with_capacity(*prev_len);
for (entity, computed_visibility, material) in query.iter() {
if computed_visibility.is_visible {
materials.push((entity, (material.clone(),)));
materials.push((entity, (material.clone_weak(),)));
}
}
*prev_len = materials.len();
Expand Down

0 comments on commit 1794083

Please sign in to comment.