summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/messages.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-11-10 19:45:30 +0000
committerRobert Pösel <robyer@seznam.cz>2013-11-10 19:45:30 +0000
commit5ab9277014a338944af494bccc8395a4513fd1c8 (patch)
tree30a9a1dd7990d3950ea02b2b08e74d8e49d0b276 /protocols/FacebookRM/src/messages.cpp
parent4ef6612404549093658e933cac68e412d69765b6 (diff)
Facebook: fixed small memory leak
git-svn-id: http://svn.miranda-ng.org/main/trunk@6862 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r--protocols/FacebookRM/src/messages.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 0adbf44134..cb5abc57cb 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -133,9 +133,12 @@ void FacebookProto::SendTypingWorker(void *p)
send_typing *typing = static_cast<send_typing*>(p);
+ // TODO: don't send typing when we are not online?
// Dont send typing notifications to contacts, that are offline or not friends
- if (getWord(typing->hContact, "Status", 0) == ID_STATUS_OFFLINE || getWord(typing->hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND)
+ if (getWord(typing->hContact, "Status", 0) == ID_STATUS_OFFLINE || getWord(typing->hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND) {
+ delete typing;
return;
+ }
// TODO RM: maybe better send typing optimalization
facy.is_typing_ = (typing->status == PROTOTYPE_SELFTYPING_ON);