diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2014-04-20 01:51:29 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-04-20 01:51:29 +0400 |
commit | b4cb46735960c2f3c8842a06571eca168b6dcb8a (patch) | |
tree | 281738a456a7954a1eb26bf5f38aeb208ca112fc /source/gameengine/Converter/KX_ConvertControllers.cpp | |
parent | a51a0ca772b21814e29bdb3b2b5fd854e29c5334 (diff) |
BGE: Fixing memory leaks when deactivating Sensors, Controllers, or actuators.
Found by Coverity and confirmed with Valgrind.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertControllers.cpp')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertControllers.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Converter/KX_ConvertControllers.cpp b/source/gameengine/Converter/KX_ConvertControllers.cpp index cd7a560edad..0215b604fdd 100644 --- a/source/gameengine/Converter/KX_ConvertControllers.cpp +++ b/source/gameengine/Converter/KX_ConvertControllers.cpp @@ -240,6 +240,8 @@ void BL_ConvertControllers( //done with gamecontroller gamecontroller->Release(); } + else if (gamecontroller) + gamecontroller->Release(); bcontr = bcontr->next; } |