diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-07 12:33:05 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-07 12:33:05 +0300 |
commit | 7ccdc4cbc0d9b2809ffe45fb9ab15551ae3df269 (patch) | |
tree | d1df7082b8df065c25c1da3f7dc1644515dc8e0f /src | |
parent | 78b72e6599a85f0c636d423a9deae935ac71f48c (diff) |
fix for rare occasional
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/chat_manager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index 378d3d6812..1065c782c3 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -393,10 +393,10 @@ BOOL SM_ChangeNick(const wchar_t *pszID, const char *pszModule, GCEVENT *gce) void SM_RemoveAll(void)
{
- for (int i = 0; i < g_arSessions.getCount(); i++)
- SM_FreeSession(g_arSessions[i], false);
-
- g_arSessions.destroy();
+ while (g_arSessions.getCount()) {
+ SM_FreeSession(g_arSessions[0], false);
+ g_arSessions.remove(0);
+ }
}
static void SM_AddCommand(const wchar_t *pszID, const char *pszModule, const char* lpNewCommand)
|