diff --git a/cocos/editor-support/cocostudio/CCSSceneReader.cpp b/cocos/editor-support/cocostudio/CCSSceneReader.cpp index 36d0adc97d..44bd667507 100644 --- a/cocos/editor-support/cocostudio/CCSSceneReader.cpp +++ b/cocos/editor-support/cocostudio/CCSSceneReader.cpp @@ -146,7 +146,7 @@ Node* SceneReader::createObject(const rapidjson::Value &dict, cocos2d::Node* par } else { - CC_SAFE_RELEASE(com); + CC_SAFE_RELEASE_NULL(com); } } if(_fnSelector != nullptr) diff --git a/samples/Cpp/TestCpp/Classes/UnitTest/UnitTest.cpp b/samples/Cpp/TestCpp/Classes/UnitTest/UnitTest.cpp index 5de0e623dc..2783d8d84e 100644 --- a/samples/Cpp/TestCpp/Classes/UnitTest/UnitTest.cpp +++ b/samples/Cpp/TestCpp/Classes/UnitTest/UnitTest.cpp @@ -343,7 +343,9 @@ void TemplateMapTest::onEnter() Map map1; CCASSERT(map1.empty(), ""); CCASSERT(map1.size() == 0, ""); +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) CCASSERT(map1.bucketCount() == 0, ""); +#endif CCASSERT(map1.keys().empty(), ""); CCASSERT(map1.keys(Node::create()).empty(), "");