From 96416c2a3fc217627308ea877979ffd25661b68d Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Jun 2025 16:56:02 -0400 Subject: [PATCH] fix(button): return from draw if there is no content layout --- src/widget/button/widget.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widget/button/widget.rs b/src/widget/button/widget.rs index aa8f0c32..da8612f7 100644 --- a/src/widget/button/widget.rs +++ b/src/widget/button/widget.rs @@ -437,7 +437,11 @@ impl<'a, Message: 'a + Clone> Widget 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;