diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-21 12:13:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-21 12:13:17 +0000 |
commit | cdc121346620d6509a0b8c6483d7f228c6e89861 (patch) | |
tree | e90ebc8855cc427f7374f2c5e47d6b3eab996e5b /plugins/TabSRMM/src/msgs.cpp | |
parent | 69f1b22444007e84cb50768fcddb2123c93f623a (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/msgs.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 667b274001..de0e3fc24e 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -291,7 +291,8 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
- CreateNewTabForContact(pContainer, hContact, 0, NULL, TRUE, TRUE, FALSE, 0);
+ if (pContainer)
+ CreateNewTabForContact(pContainer, hContact, 0, NULL, TRUE, TRUE, FALSE, 0);
}
return 0;
}
@@ -348,7 +349,8 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
- CreateNewTabForContact(pContainer, hContact, 1, (const char *)lParam, TRUE, TRUE, FALSE, 0);
+ if (pContainer)
+ CreateNewTabForContact(pContainer, hContact, 1, (const char *)lParam, TRUE, TRUE, FALSE, 0);
}
return 0;
}
@@ -402,7 +404,8 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
- CreateNewTabForContact(pContainer, hContact, 0, (const char *) lParam, TRUE, TRUE, FALSE, 0);
+ if (pContainer)
+ CreateNewTabForContact(pContainer, hContact, 0, (const char *) lParam, TRUE, TRUE, FALSE, 0);
}
return 0;
}
@@ -685,9 +688,9 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HANDLE hContact, i if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
if ((pContainer = FindMatchingContainer(_T("default"), hContact)) == NULL) {
TCHAR szName[CONTAINER_NAMELEN + 1];
-
mir_sntprintf(szName, CONTAINER_NAMELEN, _T("default"));
- pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact);
+ if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact)) == NULL)
+ return 0;
}
}
|