From 07245ebf6eff911535fd9981cc897056532ab860 Mon Sep 17 00:00:00 2001 From: lite3 Date: Thu, 26 Jun 2014 02:03:53 +0800 Subject: [PATCH] put request param in lambda in HttpClient::networkThreadAlone --- cocos/network/HttpClient.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cocos/network/HttpClient.cpp b/cocos/network/HttpClient.cpp index fbf8c9fd6c..15a1931c5b 100644 --- a/cocos/network/HttpClient.cpp +++ b/cocos/network/HttpClient.cpp @@ -181,8 +181,7 @@ void HttpClient::networkThreadAlone(HttpRequest* request) processResponse(response, errorBuffer); auto scheduler = Director::getInstance()->getScheduler(); - scheduler->performFunctionInCocosThread([response]{ - auto request = response->getHttpRequest(); + scheduler->performFunctionInCocosThread([response, request]{ const ccHttpRequestCallback& callback = request->getCallback(); Ref* pTarget = request->getTarget(); SEL_HttpResponse pSelector = request->getSelector();