[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19100] trunk/blender/source/gameengine/ Ketsji/KX_Scene.cpp: fix for segfault when the replace mesh actuator references a mesh that has no object in the current scene .
Campbell Barton
ideasman42 at gmail.com
Tue Feb 24 10:50:05 CET 2009
Revision: 19100
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19100
Author: campbellbarton
Date: 2009-02-24 10:49:28 +0100 (Tue, 24 Feb 2009)
Log Message:
-----------
fix for segfault when the replace mesh actuator references a mesh that has no object in the current scene.
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2009-02-24 05:50:45 UTC (rev 19099)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2009-02-24 09:49:28 UTC (rev 19100)
@@ -1014,6 +1014,12 @@
blendmesh->dvert!=NULL; // mesh has vertex group
bool releaseParent = true;
+
+ if (oldblendobj==NULL) {
+ std::cout << "warning: ReplaceMesh() new mesh is not used in an object from the current scene, you will get incorrect behavior" << std::endl;
+ bHasShapeKey= bHasDvert= bHasArmature= false;
+ }
+
if (bHasShapeKey)
{
BL_ShapeDeformer* shapeDeformer;
More information about the Bf-blender-cvs
mailing list