Fixed crash in AsyncTask when calling GetResult() for an exception.

This commit is contained in:
Gunnar Beutner 2012-08-14 15:06:28 +02:00
parent 9ed4e78491
commit 01a01704e7
1 changed files with 2 additions and 2 deletions

View File

@ -85,11 +85,11 @@ public:
if (m_ResultRetrieved) if (m_ResultRetrieved)
throw_exception(runtime_error("GetResult called on an AsyncTask whose result was already retrieved.")); throw_exception(runtime_error("GetResult called on an AsyncTask whose result was already retrieved."));
m_ResultRetrieved = true;
if (m_Exception) if (m_Exception)
rethrow_exception(m_Exception); rethrow_exception(m_Exception);
m_ResultRetrieved = true;
TResult result; TResult result;
std::swap(m_Result, result); std::swap(m_Result, result);
return result; return result;