Skip to content

Commit

Permalink
Don't panic on resize of hidden frame (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex authored Aug 15, 2023
1 parent 070f4ec commit a9b4450
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ where
}

fn resize(&mut self, width: NonZeroU32, height: NonZeroU32) {
let decorations = self
.decorations
.as_mut()
.expect("trying to resize the hidden frame.");
let Some(decorations) = self.decorations.as_mut() else {
log::error!("trying to resize the hidden frame.");
return;
};

decorations.resize(width.get(), height.get());
self.buttons
Expand Down

0 comments on commit a9b4450

Please sign in to comment.