From 683834cfc4a3b60ce9c5790bfbd232f591897e92 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 22 Aug 2014 19:49:38 +0900 Subject: ephysics - fix null dereference this fixes a real bug in ephysics where we explicitly deref a null ponter. fix CID 1039418 --- src/lib/ephysics/ephysics_body.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/lib/ephysics') diff --git a/src/lib/ephysics/ephysics_body.cpp b/src/lib/ephysics/ephysics_body.cpp index e7cb00d4a9..48ef8cf417 100644 --- a/src/lib/ephysics/ephysics_body.cpp +++ b/src/lib/ephysics/ephysics_body.cpp @@ -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; -- cgit v1.2.1