Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't panic when StandardMaterial normal_map hasn't loaded yet (bevye…
…ngine#5307) # Objective [This unwrap()](https://github.com/bevyengine/bevy/blob/de484c1e4147d01bf34c88a10797b75128a0d98a/crates/bevy_pbr/src/pbr_material.rs#L195) in pbr_material.rs will be hit if a StandardMaterial normal_map image has not finished loading, resulting in an error message that is hard to debug. ## Solution ~~This PR improves the error message including a potential indication of why the unwrap() could have panic'd by using expect() instead of unwrap().~~ This PR removes the panic by only proceeding if the image is found. --- ## Changelog Don't panic when StandardMaterial normal_map images have not finished loading.
- Loading branch information