mirror of https://github.com/Icinga/icinga2.git
Fixed crash in AsyncTask when calling GetResult() for an exception.
This commit is contained in:
parent
9ed4e78491
commit
01a01704e7
|
@ -85,11 +85,11 @@ public:
|
|||
if (m_ResultRetrieved)
|
||||
throw_exception(runtime_error("GetResult called on an AsyncTask whose result was already retrieved."));
|
||||
|
||||
m_ResultRetrieved = true;
|
||||
|
||||
if (m_Exception)
|
||||
rethrow_exception(m_Exception);
|
||||
|
||||
m_ResultRetrieved = true;
|
||||
|
||||
TResult result;
|
||||
std::swap(m_Result, result);
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue