summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src/gchat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeClassic/src/gchat.cpp')
-rw-r--r--protocols/SkypeClassic/src/gchat.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp
index a36884bc11..02046beeca 100644
--- a/protocols/SkypeClassic/src/gchat.cpp
+++ b/protocols/SkypeClassic/src/gchat.cpp
@@ -595,9 +595,8 @@ void SetChatTopic(const TCHAR *szChatId, TCHAR *szTopic, BOOL bSet)
int GCEventHook(WPARAM,LPARAM lParam) {
GCHOOK *gch = (GCHOOK*) lParam;
- gchat_contacts *gc = GetChat(gch->pDest->ptszID);
-
if(gch) {
+ gchat_contacts *gc = GetChat(gch->pDest->ptszID);
if (!_stricmp(gch->pDest->pszModule, SKYPE_PROTONAME)) {
switch (gch->pDest->iType) {
@@ -847,8 +846,10 @@ void GCExit(void)
{
DeleteCriticalSection (&m_GCMutex);
for (int i=0;i<chatcount;i++) {
- if (chats[i].szChatName) free(chats[i].szChatName);
- if (chats[i].mJoinedContacts) free(chats[i].mJoinedContacts);
+ if(chats[i]) {
+ free(chats[i].szChatName);
+ free(chats[i].mJoinedContacts);
+ }
}
if (chats) free (chats);
chats = NULL;