Fix crash on long menus with no links

pull/14/head
chris west 4 years ago
parent 2fee4c3700
commit e110f262a2

@ -407,7 +407,9 @@ impl Menu {
// and do nothing.
if self.scroll >= self.final_scroll() {
self.scroll = self.final_scroll();
self.link = self.links.len() - 1;
if !self.links.is_empty() {
self.link = self.links.len() - 1;
}
return Action::Redraw;
}

Loading…
Cancel
Save