summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/chat/services.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index e346526e08..60ca0f1ea4 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -418,7 +418,8 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
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;
}
}
@@ -565,7 +566,8 @@ void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground)
}
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, si->hContact);
- si->hWnd = CreateNewRoom(pContainer, si, TRUE, TRUE, FALSE);
+ if (pContainer)
+ si->hWnd = CreateNewRoom(pContainer, si, TRUE, TRUE, FALSE);
}
INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)