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 committed by Ashley Wulber
parent 7f2d34ead4
commit 96416c2a3f

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;