From cdc121346620d6509a0b8c6483d7f228c6e89861 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Aug 2013 12:13:17 +0000 Subject: tabSRMM: thy shall not create a container after shutdown git-svn-id: http://svn.miranda-ng.org/main/trunk@5771 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/mim.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'plugins/TabSRMM/src/mim.cpp') diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index cdec5bdf9b..3bb7a98cb7 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -699,7 +699,8 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) TContainerData *pContainer = FindContainerByName(szName); if (pContainer == NULL) pContainer = CreateContainer(szName, FALSE, hContact); - CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, FALSE, 0); + if (pContainer) + CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, FALSE, 0); return 0; } @@ -714,22 +715,17 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent); return 0; } - if (bAutoContainer) { - pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact); // 2 means create minimized, don't popup... - CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent); - SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0); - return 0; - } } else { CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent); return 0; } } - else if (bAutoContainer) { - pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact); // 2 means create minimized, don't popup... - CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent); - SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0); + if (bAutoContainer) { + if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact)) != NULL) { // 2 means create minimized, don't popup... + CreateNewTabForContact(pContainer, hContact, 0, NULL, bActivate, bPopup, TRUE, hDbEvent); + SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0); + } return 0; } } -- cgit v1.2.3