diff options
Diffstat (limited to 'protocols/Steam/src/steam_request.cpp')
-rw-r--r-- | protocols/Steam/src/steam_request.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/protocols/Steam/src/steam_request.cpp b/protocols/Steam/src/steam_request.cpp index 51b09ecfc3..06e83c4c25 100644 --- a/protocols/Steam/src/steam_request.cpp +++ b/protocols/Steam/src/steam_request.cpp @@ -91,13 +91,11 @@ void CSteamProto::RequestQueueThread(void*) ProcessRequestQueue();
WaitForSingleObject(m_hRequestsQueueEvent, 1000);
} while (!m_isTerminated);
- {
- mir_cslock lock(m_requestQueueLock);
- for (int i = 0; i < m_requestQueue.getCount(); i++) {
- delete m_requestQueue[i];
- m_requestQueue.remove(i);
- }
- }
+
m_hRequestQueueThread = nullptr;
+ mir_cslock lock(m_requestQueueLock);
+ for (auto &it : m_requestQueue)
+ delete it;
+ m_requestQueue.destroy();
}
\ No newline at end of file |