Skip to content
Browse files

Merge pull request #6 from shrt/master

Keyboard NullPointerException fix
  • Loading branch information...
2 parents d1713ff + af74d97 commit 2c3a639fa44172b0a3bc3e091cd24b68957f282a @andykorth committed Jan 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/OpenTK/Platform/Windows/WinRawKeyboard.cs
View
2 Source/OpenTK/Platform/Windows/WinRawKeyboard.cs
@@ -108,7 +108,7 @@ public void RefreshDevices()
string deviceClassGUID = (string)regkey.GetValue("ClassGUID"); // for windows 8 support via OpenTK issue 3198
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
- if(deviceClass != null || deviceClass.Equals(string.Empty)){
+ if(deviceClass == null || deviceClass.Equals(string.Empty)){
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
}

0 comments on commit 2c3a639

Please sign in to comment.
Something went wrong with that request. Please try again.