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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-04-02 00:46:20 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-02 00:46:20 +0400
commit51ea7645e253d50dd8936ab89c5c40dc5c952b81 (patch)
treeb5c68639e8a8132b17b068521b3278f249283c4c /source/gameengine/GameLogic/SCA_IScene.cpp
parent82e816eb1a8a37a9905c7a73da4555cc160c575b (diff)
Fix BGE bug: BGE will crash if objects with display debug property is deleted (bad practice anyway). The actual deletion is now postponed until end of scene
Diffstat (limited to 'source/gameengine/GameLogic/SCA_IScene.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_IScene.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_IScene.cpp b/source/gameengine/GameLogic/SCA_IScene.cpp
index d4463196379..a2f0693b475 100644
--- a/source/gameengine/GameLogic/SCA_IScene.cpp
+++ b/source/gameengine/GameLogic/SCA_IScene.cpp
@@ -30,11 +30,22 @@
*/
#include "SCA_IScene.h"
+#include "Value.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+SCA_DebugProp::SCA_DebugProp(): m_obj(NULL)
+{
+}
+
+SCA_DebugProp::~SCA_DebugProp()
+{
+ if (m_obj)
+ m_obj->Release();
+}
+
SCA_IScene::SCA_IScene()
{
}
@@ -64,6 +75,7 @@ void SCA_IScene::AddDebugProperty(class CValue* debugprop,
{
SCA_DebugProp* dprop = new SCA_DebugProp();
dprop->m_obj = debugprop;
+ debugprop->AddRef();
dprop->m_name = name;
m_debugList.push_back(dprop);
}