summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/mim.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-21 12:13:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-21 12:13:17 +0000
commitcdc121346620d6509a0b8c6483d7f228c6e89861 (patch)
treee90ebc8855cc427f7374f2c5e47d6b3eab996e5b /plugins/TabSRMM/src/mim.cpp
parent69f1b22444007e84cb50768fcddb2123c93f623a (diff)
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
Diffstat (limited to 'plugins/TabSRMM/src/mim.cpp')
-rw-r--r--plugins/TabSRMM/src/mim.cpp18
1 files changed, 7 insertions, 11 deletions
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;
}
}