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_ConvertSensors.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_ConvertSensors.cpp')
-rw-r--r--source/gameengine/Converter/KX_ConvertSensors.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp
index 6ab382f7956..b3c6f6ddd24 100644
--- a/source/gameengine/Converter/KX_ConvertSensors.cpp
+++ b/source/gameengine/Converter/KX_ConvertSensors.cpp
@@ -640,6 +640,9 @@ void BL_ConvertSensors(struct Object* blenderobject,
gamesensor->Release();
}
+ else if (gamesensor)
+ gamesensor->Release();
+
sens=sens->next;
}
}