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_ConvertActuators.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_ConvertActuators.cpp')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertActuators.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index d7578c3f03f..b59c26ab90b 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -1122,6 +1122,8 @@ void BL_ConvertActuators(const char* maggiename, // done with baseact, release it baseact->Release(); } + else if (baseact) + baseact->Release(); bact = bact->next; } |