ephysics - fix null dereference

this fixes a real bug in ephysics where we explicitly deref a null
ponter. fix CID 1039418
This commit is contained in:
Carsten Haitzler 2014-08-22 19:49:38 +09:00
parent 91c0198273
commit 683834cfc4
1 changed files with 1 additions and 7 deletions

View File

@ -2122,13 +2122,7 @@ _ephysics_body_soft_body_add(EPhysics_World *world, btCollisionShape *collision_
body = _ephysics_body_rigid_body_add(world, collision_shape, "soft box", 0.5,
0.5, 0.5);
if (!body)
{
if (body->deleted) return NULL;
body->deleted = EINA_TRUE;
ephysics_world_body_del(body->world, body);
return NULL;
}
if (!body) return NULL;
body->material_index = 0;
body->type = EPHYSICS_BODY_TYPE_SOFT;