Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-04-20 01:51:29 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-04-20 01:51:29 +0400
commitb4cb46735960c2f3c8842a06571eca168b6dcb8a (patch)
tree281738a456a7954a1eb26bf5f38aeb208ca112fc /source/gameengine/Converter/KX_ConvertControllers.cpp
parenta51a0ca772b21814e29bdb3b2b5fd854e29c5334 (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.cpp2
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;
}