summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/statistic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryStats/src/statistic.cpp')
-rw-r--r--plugins/HistoryStats/src/statistic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index e609101d3d..f2a5fceaf3 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -1303,7 +1303,6 @@ bool Statistic::createStatistics()
/*
* Cleanup.
*/
- CloseHandle(hThread);
CloseHandle(m_hCancelEvent);
m_hCancelEvent = NULL;
m_hWndProgress = NULL;
@@ -1372,9 +1371,11 @@ bool Statistic::createStatisticsSteps()
void __cdecl Statistic::threadProc(void *lpParameter)
{
Statistic* pStats = reinterpret_cast<Statistic*>(lpParameter);
-
SetEvent(pStats->m_hThreadPushEvent);
+ // perform action
+ pStats->createStatistics();
+
// check for errors
if (!pStats->m_ErrorText.empty() && !mu::system::terminated())
MessageBox(0, pStats->m_ErrorText.c_str(), TranslateT("HistoryStats - Error"), MB_ICONERROR | MB_OK);