Skip to content

Commit

Permalink
Fix rare OutOfRange crash in first start wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed Mar 4, 2023
1 parent beee03a commit cc4b517
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/BulkCrapUninstaller/Forms/Wizards/FirstStartBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ private void timer1_Tick(object sender, EventArgs e)

//Console.WriteLine(string.Format("{0,5}{1,5}{2,5}", currentXPos, change, resultXPos));

resultXPos = Math.Clamp(resultXPos, scrollPanel.HorizontalScroll.Minimum, scrollPanel.HorizontalScroll.Maximum);

// Double assign is needed because of a bug in the control
scrollPanel.HorizontalScroll.Value = resultXPos;
scrollPanel.HorizontalScroll.Value = resultXPos;
Expand Down

0 comments on commit cc4b517

Please sign in to comment.