//shouldn't get out of range but easy fix by adding a range max limit private void setSkin(ComboBox sender, SnakePlayer sp) { if (sp != null) { int col = sender.SelectedIndex; string n = sender.Items[(col >= 0?col:0)].ToString(); Brush b = new SolidBrush(Color.FromName(n)); sp.SetColor(b); GameCanvas.Invalidate(); } }