diff options
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)
|