Fix menu crash (please check)

This commit is contained in:
Andre Bernet
2016-04-04 21:40:04 +04:00
parent 0e7662b36d
commit cbe92aa058
+1 -1
View File
@@ -567,7 +567,7 @@ bool check(check_event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, u
numLines++;
}
}
if (menuVerticalPosition >= lastLine || horTab[firstLine] == ORPHAN_ROW) {
if (menuVerticalPosition >= lastLine || ((firstLine <= horTabMax) && (horTab[firstLine] == ORPHAN_ROW))) {
menuVerticalOffset++;
}
else {