Merge pull request #13399 from WenhaiLin/v3.8-beta2

DownloaderAsyncTest:Fixed crash cause by double-click `start download` button.
This commit is contained in:
子龙山人 2015-08-17 11:28:43 +08:00
commit 4000cff902
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,8 @@ void DownloaderAsyncTest::onEnter()
DownloaderBaseTest::onEnter();
auto menuItem = MenuItemFont::create("start download", [=](Ref* sender){
MenuItemFont* item = (MenuItemFont*)sender;
item->setEnabled(false);
if (_downloader)
{
std::string path = FileUtils::getInstance()->getWritablePath() + "CppTests/DownloaderTest/cocos2d_logo_async.jpg";