Fixing a crash when converting physics objects in the Game Engine.
authorDaniel Stokes <kupomail@gmail.com>
Sun, 26 Feb 2012 21:57:51 +0000 (21:57 +0000)
committerDaniel Stokes <kupomail@gmail.com>
Sun, 26 Feb 2012 21:57:51 +0000 (21:57 +0000)
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp

index a22122a245e5f430e192cac08c8e9a147e302d92..9972f9916b9110a76aa23227604b523ac7c68851 100644 (file)
@@ -1431,6 +1431,7 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject* meshobj, DerivedMesh* dm,
        if (!dm) {
                free_dm = true;
                dm = CDDM_from_mesh(meshobj->GetMesh(), NULL);
+               DM_ensure_tessface(dm);
        }
 
        MVert *mvert = dm->getVertArray(dm);