* Platform/X11/X11Keyboard.cs: Added index bounds check for

GetState.
This commit is contained in:
the_fiddler 2010-10-21 07:56:48 +00:00
parent 1a8f589f5c
commit 23ad81d12b

View file

@ -75,6 +75,10 @@ namespace OpenTK.Platform.X11
public KeyboardState GetState(int index)
{
// X11Keyboard supports a single keyboard only
if (index < 0 || index > 1)
throw new ArgumentOutOfRangeException("index");
ProcessEvents();
return state;
}