fix(button): return from draw if there is no content layout

This commit is contained in:
Ashley Wulber 2025-06-10 16:56:02 -04:00
parent 6ef44794c5
commit be4a52bb38
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -437,7 +437,11 @@ impl<'a, Message: 'a + Clone> Widget<Message, crate::Theme, crate::Renderer>
if !viewport.intersects(&bounds) {
return;
}
let content_layout = layout.children().next().unwrap();
// FIXME: Why is there no content layout
let Some(content_layout) = layout.children().next() else {
return;
};
let mut headerbar_alpha = None;