summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-01-21 20:47:21 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-01-21 20:47:21 +0000
commit43a1216dcb4a4e381a0c917f8eb9db89119073d7 (patch)
treebd57618f48a43702fd6b1eccaf390ea4767895eb /plugins/HistoryStats/src
parentc5d77bbf98e23fec98db55c9708525eafd447b0b (diff)
HistoryStats:
-Fixed memory leak -minor cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@11890 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats/src')
-rw-r--r--plugins/HistoryStats/src/column_split.cpp2
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.cpp2
-rw-r--r--plugins/HistoryStats/src/statistic.cpp9
3 files changed, 7 insertions, 6 deletions
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp
index 48d47b579f..7a21a97940 100644
--- a/plugins/HistoryStats/src/column_split.cpp
+++ b/plugins/HistoryStats/src/column_split.cpp
@@ -318,7 +318,7 @@ ColSplit::SplitParams ColSplit::getParams() const
}
break;
- case 2: // custom
+ default: // custom
{
params.alignment = m_nGraphAlign;
params.hours_in_block = unitFactors[m_nBlockUnit] * m_nUnitsPerBlock;
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp
index f28bc6cb6d..77e1211241 100644
--- a/plugins/HistoryStats/src/column_splittimeline.cpp
+++ b/plugins/HistoryStats/src/column_splittimeline.cpp
@@ -397,7 +397,7 @@ ColSplitTimeline::SplitParams ColSplitTimeline::getParams() const
}
break;
- case 2: // custom
+ default: // custom
{
params.alignment = m_nGraphAlign;
params.columns_to_group = m_nCustomGroup;
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 3a202f3f09..61647087cd 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -1477,15 +1477,16 @@ void Statistic::run(const Settings& settings, InvocationSource invokedFrom, HINS
m_bRunning = true;
- // create object holding and performing the statistics
- Statistic* pStats = new Statistic(settings, invokedFrom, hInst);
-
+ HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
// create event for thread stack unwinding
- if ((pStats->m_hThreadPushEvent = CreateEvent(NULL, FALSE, FALSE, NULL)) == NULL) {
+ if (hEvent == NULL) {
m_bRunning = false;
return;
}
+ // create object holding and performing the statistics
+ Statistic *pStats = new Statistic(settings, invokedFrom, hInst);
+ pStats->m_hThreadPushEvent = hEvent;
// create worker thread
DWORD dwThreadID = 0;
HANDLE hThread = CreateThread(NULL, 0, threadProc, pStats, 0, &dwThreadID);