diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 4344fdcb..2adbd870 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -2598,6 +2598,10 @@ static int friends_list_load(Messenger *m, const uint8_t *data, uint32_t length) | |||
2598 | 2598 | ||
2599 | if (temp.status >= 3) { | 2599 | if (temp.status >= 3) { |
2600 | int fnum = m_addfriend_norequest(m, temp.client_id); | 2600 | int fnum = m_addfriend_norequest(m, temp.client_id); |
2601 | |||
2602 | if (fnum < 0) | ||
2603 | continue; | ||
2604 | |||
2601 | setfriendname(m, fnum, temp.name, ntohs(temp.name_length)); | 2605 | setfriendname(m, fnum, temp.name, ntohs(temp.name_length)); |
2602 | set_friend_statusmessage(m, fnum, temp.statusmessage, ntohs(temp.statusmessage_length)); | 2606 | set_friend_statusmessage(m, fnum, temp.statusmessage, ntohs(temp.statusmessage_length)); |
2603 | set_friend_userstatus(m, fnum, temp.userstatus); | 2607 | set_friend_userstatus(m, fnum, temp.userstatus); |