diff --git a/cocos/2d/CCComponentContainer.cpp b/cocos/2d/CCComponentContainer.cpp index 2ead55b2fd..3918cbfe4c 100644 --- a/cocos/2d/CCComponentContainer.cpp +++ b/cocos/2d/CCComponentContainer.cpp @@ -62,7 +62,7 @@ bool ComponentContainer::add(Component *com) if (_componentMap.find(componentName) != _componentMap.end()) { - CCASSERT(true, "ComponentContainer already have this kind of component"); + CCASSERT(false, "ComponentContainer already have this kind of component"); break; } _componentMap[componentName] = com; diff --git a/cocos/physics/CCPhysicsBody.cpp b/cocos/physics/CCPhysicsBody.cpp index 81f10f84da..64de9a7b9d 100644 --- a/cocos/physics/CCPhysicsBody.cpp +++ b/cocos/physics/CCPhysicsBody.cpp @@ -76,6 +76,7 @@ PhysicsBody::PhysicsBody() , _recordScaleX(1.f) , _recordScaleY(1.f) { + _name = COMPONENT_NAME; } PhysicsBody::~PhysicsBody()