Skip to content

Commit

Permalink
prevent problems if deleting backups while scrolled to the max
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidFenrir committed Jan 15, 2018
1 parent 380a2ed commit e49aff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/blocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void slots_list::draw_list(void)
buttons[BUTTON_ARROW_DOWN].draw();

const unsigned int names_per_screen = 7;
if(this->selected_backup == this->scroll-1)
if(this->selected_backup == this->scroll-1 || this->backups.size()-this->scroll+1 < names_per_screen)
this->scroll--;
else if(this->backups.size()-this->scroll >= names_per_screen)
{
Expand Down

0 comments on commit e49aff7

Please sign in to comment.