diff options
author | Jman012 <jman012guy@gmail.com> | 2014-02-19 09:31:29 -0800 |
---|---|---|
committer | Jman012 <jman012guy@gmail.com> | 2014-02-19 09:31:29 -0800 |
commit | 7838973ef3fd9c04459efd038ffbe969f491a574 (patch) | |
tree | d02127a85a0813324a435c9f2824dd56b8e34e17 | |
parent | fdf1b6932ba8fd5fbd1bd237a471aa99c79e4744 (diff) |
Fixed the groupchat bug in a smarter way.
-rw-r--r-- | toxcore/group_chats.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c index b610e9a5..1ec8ede5 100644 --- a/toxcore/group_chats.c +++ b/toxcore/group_chats.c | |||
@@ -787,7 +787,10 @@ static void del_dead_peers(Group_Chat *chat) | |||
787 | delpeer(chat, i); | 787 | delpeer(chat, i); |
788 | } | 788 | } |
789 | 789 | ||
790 | if (chat->group != NULL && chat->group[i].deleted) { | 790 | if (chat->group == NULL || i >= chat->numpeers) |
791 | break; | ||
792 | |||
793 | if (chat->group[i].deleted) { | ||
791 | if (is_timeout(chat->group[i].deleted_time, DEL_PEER_DELAY)) | 794 | if (is_timeout(chat->group[i].deleted_time, DEL_PEER_DELAY)) |
792 | delpeer(chat, i); | 795 | delpeer(chat, i); |
793 | } | 796 | } |