Skip to content

Commit

Permalink
Merge pull request #121 from asaaki/fix/minimize-crash
Browse files Browse the repository at this point in the history
Allow minimising
  • Loading branch information
StarArawn authored Jul 19, 2022
2 parents e7fc09a + 43f7e93 commit 3b42179
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bevy_kayak_renderer/src/render/ui_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ impl Node for MainPassUINode {
world: &World,
) -> Result<(), NodeRunError> {
let view_entity = graph.get_input_entity(Self::IN_VIEW)?;
let (transparent_phase, target) = self
.query
.get_manual(world, view_entity)
.expect("view entity should exist");
// adapted from bevy itself;
// see: <https://github.com/bevyengine/bevy/commit/09a3d8abe062984479bf0e99fcc1508bb722baf6>
let (transparent_phase, target) = match self.query.get_manual(world, view_entity) {
Ok(it) => it,
_ => return Ok(()),
};
// let clear_color = world.get_resource::<ClearColor>().unwrap();
{
let pass_descriptor = RenderPassDescriptor {
Expand Down

0 comments on commit 3b42179

Please sign in to comment.