projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7829fa6
)
[Win] Avoid NRE in WinFactory.Dispose()
author
thefiddler
<stapostol@gmail.com>
Tue, 23 Sep 2014 06:55:02 +0000
(08:55 +0200)
committer
thefiddler
<stapostol@gmail.com>
Tue, 23 Sep 2014 06:55:02 +0000
(08:55 +0200)
WinFactory.Dispose() could crash with a NRE when the joystick driver has
not been initialized. Fixed by checking for null before disposing the
input driver.
Source/OpenTK/Platform/Windows/WinFactory.cs
patch
|
blob
|
history
diff --git
a/Source/OpenTK/Platform/Windows/WinFactory.cs
b/Source/OpenTK/Platform/Windows/WinFactory.cs
index
d09b4de
..
6f57024
100644
(file)
--- a/
Source/OpenTK/Platform/Windows/WinFactory.cs
+++ b/
Source/OpenTK/Platform/Windows/WinFactory.cs
@@
-163,7
+163,12
@@
namespace OpenTK.Platform.Windows
{
if (manual)
{
- rawinput_driver.Dispose();
+ WinRawInput raw = rawinput_driver;
+ if (raw != null)
+ {
+ raw.Dispose();
+ rawinput_driver = null;
+ }
}
base.Dispose(manual);