From e44d28ea7b22a01370fb36782ced590bd2bdbff6 Mon Sep 17 00:00:00 2001 From: chengstory Date: Mon, 6 Jan 2014 13:27:19 +0800 Subject: [PATCH 1/2] replace CC_SAFE_RELEASE to CC_SAFE_RELEASE_NULL --- cocos/editor-support/cocostudio/CCSSceneReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 4261a441dece073c70360909adffdc75f6404f65 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Mon, 6 Jan 2014 15:19:47 +0800 Subject: [PATCH 2/2] fix crash in UnitTest.cpp on vs. --- samples/Cpp/TestCpp/Classes/UnitTest/UnitTest.cpp | 2 ++ 1 file changed, 2 insertions(+) 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(), "");