summaryrefslogtreecommitdiff
path: root/plugins/Ping/src/pinggraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Ping/src/pinggraph.cpp')
-rw-r--r--plugins/Ping/src/pinggraph.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/Ping/src/pinggraph.cpp b/plugins/Ping/src/pinggraph.cpp
index cc2252a521..735d8a4bfa 100644
--- a/plugins/Ping/src/pinggraph.cpp
+++ b/plugins/Ping/src/pinggraph.cpp
@@ -23,7 +23,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
bool found = false;
- EnterCriticalSection(&data_list_cs);
+ mir_cslock lck(data_list_cs);
for(pinglist_it i = data_list.begin(); i != data_list.end(); ++i) {
if(i->item_id == wd->item_id) {
wd->list = history_map[wd->item_id];
@@ -31,7 +31,6 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
break;
}
}
- LeaveCriticalSection(&data_list_cs);
if(!found) {
PostMessage(hwnd, WM_CLOSE, 0, 0);