From 817d59f3794319b42b7b20c9373bb8794708dd24 Mon Sep 17 00:00:00 2001 From: cutealien Date: Sat, 19 Nov 2022 16:41:11 +0000 Subject: [PATCH] Prevent potential 0 pointer access when release not acquired joystick. Found by clang analyser. Not sure if it could really ever have happened, but won't hurt to fix git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6443 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CIrrDeviceWin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Irrlicht/CIrrDeviceWin32.cpp b/source/Irrlicht/CIrrDeviceWin32.cpp index 7eae8e2..c9ad4e4 100644 --- a/source/Irrlicht/CIrrDeviceWin32.cpp +++ b/source/Irrlicht/CIrrDeviceWin32.cpp @@ -117,8 +117,8 @@ namespace irr if (dev) { dev->Unacquire(); + dev->Release(); } - dev->Release(); } if (DirectInputDevice)