diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs index c234b1ed4e..f2ab16a23e 100644 --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -216,7 +216,11 @@ impl ShaderCache { } composer.add_composable_module(shader.into())?; + } else { + Err(PipelineCacheError::ShaderImportNotYetAvailable)?; } + } else { + Err(PipelineCacheError::ShaderImportNotYetAvailable)?; } // if we fail to add a module the composer will tell us what is missing }