diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-07 17:52:01 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-07 17:52:01 +0300 |
commit | c13e5563e2e248992a201466a9ce1c73b3c58808 (patch) | |
tree | 634851a4404c61ebb5c4d4e6fc29473e81826762 /src/mir_app | |
parent | 68d2c9566660c706ec13564ec7bc029cd85a6752 (diff) |
fixes occasional crash on exit
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_manager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index 6078ec9d3a..77b6a8a905 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -379,9 +379,10 @@ BOOL SM_ChangeNick(const wchar_t *pszID, const char *pszModule, GCEVENT *gce) void SM_RemoveAll(void)
{
- for (auto &it : g_arSessions)
+ for (auto &it : g_arSessions.rev_iter()) {
SM_FreeSession(it, false);
- g_arSessions.destroy();
+ g_arSessions.remove(g_arSessions.indexOf(&it));
+ }
}
static void SM_AddCommand(const wchar_t *pszID, const char *pszModule, const char* lpNewCommand)
|