Avoid underflow in stack widget

Fixes #3062
This commit is contained in:
Héctor Ramón Jiménez 2025-09-23 02:23:32 +02:00
parent 145534c92e
commit 629e795784
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -217,6 +217,10 @@ where
shell: &mut Shell<'_, Message>,
viewport: &Rectangle,
) {
if self.children.is_empty() {
return;
}
let is_over = cursor.is_over(layout.bounds());
let end = self.children.len() - 1;