summaryrefslogtreecommitdiffhomepage
path: root/dinput/dinput.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-22 03:36:22 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-22 03:36:22 +0100
commitef9f0f7a29b0e11646030e1a8455740e442f0def (patch)
tree1dce615b67faf1cf92e412cc8e212c6ad5c31474 /dinput/dinput.cpp
parent895daccda1453bf3d1fd99ed4a02087761e9643e (diff)
[COVERITY] dinput: fix possible null pointer dereference
Diffstat (limited to 'dinput/dinput.cpp')
-rw-r--r--dinput/dinput.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/dinput/dinput.cpp b/dinput/dinput.cpp
index 8909921a..226d3277 100644
--- a/dinput/dinput.cpp
+++ b/dinput/dinput.cpp
@@ -33,8 +33,10 @@ dinput_handle::di_t dinput_handle::make_di()
void dinput_handle::di_t::free_di()
{
if (handle && *handle)
+ {
(*handle)->Release();
- *handle = nullptr;
+ *handle = nullptr;
+ }
handle = nullptr;
}