fix for SH-2941: crash at LLCurl::Easy::~Easy() (Bao Linden)

This commit is contained in:
Siana Gearz
2012-03-21 21:31:31 +01:00
parent a57ad256b5
commit 1e9e7d701d
2 changed files with 8 additions and 3 deletions

View File

@@ -583,10 +583,10 @@ LLCurl::Multi::Multi(F32 idle_time_out)
LLCurl::Multi::~Multi()
{
cleanup() ;
cleanup(true);
}
void LLCurl::Multi::cleanup()
void LLCurl::Multi::cleanup(bool deleted)
{
if(!mCurlMultiHandle)
{
@@ -599,6 +599,11 @@ void LLCurl::Multi::cleanup()
{
Easy* easy = *iter;
check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
if(deleted)
{
easy->mResponder = NULL ; //avoid triggering mResponder.
}
delete easy;
}
mEasyActiveList.clear();