From ef9f0f7a29b0e11646030e1a8455740e442f0def Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 22 Mar 2017 03:36:22 +0100 Subject: [COVERITY] dinput: fix possible null pointer dereference --- dinput/dinput.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3