diff --git a/Cargo.toml b/Cargo.toml index bc04f24..5eed7cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "bevy_polyline" -version = "0.9.0" +version = "0.9.1" description = "Polyline Rendering for Bevy" license = "MIT OR Apache-2.0" repository = "https://github.com/ForesightMiningSoftwareCorporation/bevy_polyline" diff --git a/src/polyline.rs b/src/polyline.rs index 2d29962..47faea3 100644 --- a/src/polyline.rs +++ b/src/polyline.rs @@ -319,13 +319,15 @@ pub fn prepare_polyline_bind_group( render_device: Res, polyline_uniforms: Res>, ) { - commands.insert_resource(PolylineBindGroup { - value: render_device.create_bind_group( - Some("polyline_bind_group"), - &polyline_pipeline.polyline_layout, - &BindGroupEntries::single(polyline_uniforms.uniforms()), - ), - }); + if let Some(binding) = polyline_uniforms.uniforms().binding() { + commands.insert_resource(PolylineBindGroup { + value: render_device.create_bind_group( + Some("polyline_bind_group"), + &polyline_pipeline.polyline_layout, + &BindGroupEntries::single(binding), + ), + }); + } } #[derive(Component)]