Add PanelScroll Value Check (#931)

Prevents ArgumentOutOfRangeException.
This commit is contained in:
ReignOfComputer 2017-03-09 15:32:52 +08:00 committed by Kaphotics
parent 13aa01ff99
commit ad8f661863

View File

@ -162,6 +162,8 @@ internal static int getIndex(ComboBox cb)
public static void PanelScroll(object sender, ScrollEventArgs e)
{
var p = sender as Panel;
if (e.NewValue < 0)
return;
switch (e.ScrollOrientation)
{
case ScrollOrientation.HorizontalScroll: