mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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…
x
Reference in New Issue
Block a user