diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index f0415501..3b09baa2 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -273,6 +273,9 @@ int m_delfriend(Messenger *m, int friendnumber) | |||
273 | if (friend_not_valid(m, friendnumber)) | 273 | if (friend_not_valid(m, friendnumber)) |
274 | return -1; | 274 | return -1; |
275 | 275 | ||
276 | if (m->friendlist[friendnumber].status == FRIEND_ONLINE) | ||
277 | --m->numonline_friends; | ||
278 | |||
276 | onion_delfriend(m->onion_c, m->friendlist[friendnumber].onion_friendnum); | 279 | onion_delfriend(m->onion_c, m->friendlist[friendnumber].onion_friendnum); |
277 | crypto_kill(m->net_crypto, m->friendlist[friendnumber].crypt_connection_id); | 280 | crypto_kill(m->net_crypto, m->friendlist[friendnumber].crypt_connection_id); |
278 | free(m->friendlist[friendnumber].statusmessage); | 281 | free(m->friendlist[friendnumber].statusmessage); |