[Bf-blender-cvs] [88843ca] master: BGE: Fixing memory corruption/double free when duplicating (e.g., addObject) LibLoaded lights.
Mitchell Stokes
noreply at git.blender.org
Tue Feb 4 23:49:20 CET 2014
Commit: 88843caaa3dd95e887f43f4c66ff7e47c6d31d66
Author: Mitchell Stokes
Date: Tue Feb 4 10:54:09 2014 -0800
https://developer.blender.org/rB88843caaa3dd95e887f43f4c66ff7e47c6d31d66
BGE: Fixing memory corruption/double free when duplicating (e.g., addObject) LibLoaded lights.
===================================================================
M source/gameengine/Ketsji/KX_Light.cpp
===================================================================
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 3a8821e..20db6d2 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -101,6 +101,8 @@ CValue* KX_LightObject::GetReplica()
replica->m_lightobj.m_light = replica;
m_rasterizer->AddLight(&replica->m_lightobj);
+ if (m_base)
+ m_base = NULL;
return replica;
}
More information about the Bf-blender-cvs
mailing list