diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/Messenger.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 2adbd870..b65f09ae 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1206,8 +1206,10 @@ int join_groupchat(Messenger *m, int32_t friendnumber, const uint8_t *friend_gro | |||
1206 | 1206 | ||
1207 | IP_Port friend_ip = get_friend_ipport(m, friendnumber); | 1207 | IP_Port friend_ip = get_friend_ipport(m, friendnumber); |
1208 | 1208 | ||
1209 | if (friend_ip.ip.family == 0) | 1209 | if (friend_ip.ip.family == 0) { |
1210 | del_groupchat(m, groupnum); | ||
1210 | return -1; | 1211 | return -1; |
1212 | } | ||
1211 | 1213 | ||
1212 | id_copy(data, friend_group_public_key); | 1214 | id_copy(data, friend_group_public_key); |
1213 | id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key); | 1215 | id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key); |
@@ -1218,6 +1220,7 @@ int join_groupchat(Messenger *m, int32_t friendnumber, const uint8_t *friend_gro | |||
1218 | return groupnum; | 1220 | return groupnum; |
1219 | } | 1221 | } |
1220 | 1222 | ||
1223 | del_groupchat(m, groupnum); | ||
1221 | return -1; | 1224 | return -1; |
1222 | } | 1225 | } |
1223 | 1226 | ||