From: cutealien Date: Sat, 19 Nov 2022 16:41:11 +0000 (+0000) Subject: Prevent potential 0 pointer access when release not acquired joystick. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=6f3435f349e778af21f172d9c954e7cdb44efe7c;p=irrlicht.git 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 --- 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)