Skip to content

Commit e49aff7

Browse files
committed
prevent problems if deleting backups while scrolled to the max
1 parent 380a2ed commit e49aff7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/blocks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ void slots_list::draw_list(void)
254254
buttons[BUTTON_ARROW_DOWN].draw();
255255

256256
const unsigned int names_per_screen = 7;
257-
if(this->selected_backup == this->scroll-1)
257+
if(this->selected_backup == this->scroll-1 || this->backups.size()-this->scroll+1 < names_per_screen)
258258
this->scroll--;
259259
else if(this->backups.size()-this->scroll >= names_per_screen)
260260
{

0 commit comments

Comments
 (0)