aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
committerSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
commitd1c812f1162e5fdb13c215792725b2591d7428f5 (patch)
tree407056c45c7e9320c48fca6a3697d81a061c4ea0 /PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h
parentPhysX 3.4, APEX 1.4 patch release @22121272 (diff)
downloadphysx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.tar.xz
physx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.zip
PhysX 3.4.1, APEX 1.4.1 Release @22845541v3.4.1
Diffstat (limited to 'PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h')
-rw-r--r--PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h b/PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h
index e7bef5c6..855409a1 100644
--- a/PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h
+++ b/PhysX_3.4/Source/PhysX/src/NpRigidActorTemplate.h
@@ -233,14 +233,16 @@ template<class APIClass>
void NpRigidActorTemplate<APIClass>::detachShape(PxShape& shape, bool wakeOnLostTouch)
{
NP_WRITE_CHECK(NpActor::getOwnerScene(*this));
- PX_CHECK_AND_RETURN(mShapeManager.shapeIsAttached(static_cast<NpShape&>(shape)), "PxRigidActor::detachShape: shape is not attached!")
if (mShapeManager.getPruningStructure())
{
Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxRigidActor::detachShape: Actor is part of a pruning structure, pruning structure is now invalid!");
mShapeManager.getPruningStructure()->invalidate(this);
}
- mShapeManager.detachShape(static_cast<NpShape&>(shape), *this, wakeOnLostTouch);
+ if(!mShapeManager.detachShape(static_cast<NpShape&>(shape), *this, wakeOnLostTouch))
+ {
+ Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__, "PxRigidActor::detachShape: shape is not attached to this actor!");
+ }
}