summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-23 21:09:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-23 21:09:55 +0300
commitbfdbaf6f3d1ebf0b255a715a0b0d6626e312eaa4 (patch)
tree0524ff373da748b483899e4aead07807a7031cf4
parent53e07c1a2bd9ee7b24a65466dd930c694dcd55e7 (diff)
fix for a random crash on exit
-rw-r--r--include/m_utils.h2
-rw-r--r--src/mir_app/src/modules.cpp3
-rw-r--r--src/mir_core/src/windowlist.cpp3
3 files changed, 4 insertions, 4 deletions
diff --git a/include/m_utils.h b/include/m_utils.h
index 224fe5f859..567e9689a6 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -132,7 +132,7 @@ EXTERN_C MIR_CORE_DLL(MWindowList) WindowList_Create(void);
/////////////////////////////////////////////////////////////////////////////////////////
// destroys a window list
-EXTERN_C MIR_CORE_DLL(void) WindowList_Destroy(MWindowList hList);
+EXTERN_C MIR_CORE_DLL(void) WindowList_Destroy(MWindowList &hList);
/////////////////////////////////////////////////////////////////////////////////////////
// adds a window to the specified window list
diff --git a/src/mir_app/src/modules.cpp b/src/mir_app/src/modules.cpp
index ff9117276b..e2ef701b02 100644
--- a/src/mir_app/src/modules.cpp
+++ b/src/mir_app/src/modules.cpp
@@ -166,7 +166,6 @@ int LoadDefaultModules(void)
void UnloadDefaultModules(void)
{
- UnloadChatModule();
UnloadAccountsModule();
UnloadMetacontacts();
UnloadNewPlugins();
@@ -174,7 +173,7 @@ void UnloadDefaultModules(void)
UnloadSkinSounds();
UnloadSkinHotkeys();
UnloadSrmmModule();
- // UnloadErrorsModule();
+ UnloadChatModule();
UnloadIcoLibModule();
UnloadUtilsModule();
UnloadExtraIconsModule();
diff --git a/src/mir_core/src/windowlist.cpp b/src/mir_core/src/windowlist.cpp
index 335e3db5d8..7af092dc1d 100644
--- a/src/mir_core/src/windowlist.cpp
+++ b/src/mir_core/src/windowlist.cpp
@@ -47,9 +47,10 @@ MIR_CORE_DLL(MWindowList) WindowList_Create(void)
return new TWindowList();
}
-MIR_CORE_DLL(void) WindowList_Destroy(MWindowList hList)
+MIR_CORE_DLL(void) WindowList_Destroy(MWindowList &hList)
{
delete hList;
+ hList = nullptr;
}
MIR_CORE_DLL(int) WindowList_Add(MWindowList hList, HWND hwnd, MCONTACT hContact)