diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-04 10:49:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-04 10:49:20 +0000 |
commit | b5ed6609e84c1ad21d29a8f2e3c490b6ccfcbe1d (patch) | |
tree | b71340ca1a03745527c3aeb46d12abeca91b8b4f | |
parent | 61215a68db4b8a8171be096469c07c33741852c7 (diff) |
chat module to be destroyed only if it was initialized once
git-svn-id: http://svn.miranda-ng.org/main/trunk@11763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/modules/chat/chat_svc.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index 11f1d62ce0..168a786d62 100644 --- a/src/modules/chat/chat_svc.cpp +++ b/src/modules/chat/chat_svc.cpp @@ -101,13 +101,15 @@ static int IconsChanged(WPARAM, LPARAM) static int PreShutdown(WPARAM, LPARAM) { - ci.SM_BroadcastMessage(NULL, GC_CLOSEWINDOW, 0, 1, FALSE); + if (g_Settings != NULL) { + ci.SM_BroadcastMessage(NULL, GC_CLOSEWINDOW, 0, 1, FALSE); - ci.SM_RemoveAll(); - ci.MM_RemoveAll(); + ci.SM_RemoveAll(); + ci.MM_RemoveAll(); - DeleteObject(ci.hListBkgBrush); - DeleteObject(ci.hListSelectedBkgBrush); + DeleteObject(ci.hListBkgBrush); + DeleteObject(ci.hListSelectedBkgBrush); + } return 0; } |