From 6f3435f349e778af21f172d9c954e7cdb44efe7c 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 1033f9e..7b12232 100644 --- a/source/Irrlicht/CIrrDeviceWin32.cpp +++ b/source/Irrlicht/CIrrDeviceWin32.cpp @@ -121,8 +121,8 @@ namespace irr if (dev) { dev->Unacquire(); + dev->Release(); } - dev->Release(); } if (DirectInputDevice)