From b5ed6609e84c1ad21d29a8f2e3c490b6ccfcbe1d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 4 Jan 2015 10:49:20 +0000 Subject: 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 --- src/modules/chat/chat_svc.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules/chat/chat_svc.cpp') 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; } -- cgit v1.2.3