mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed segfault.
This commit is contained in:
parent
a82ad576a2
commit
067cc9630a
|
@ -732,7 +732,8 @@ static int group_num(Messenger *m, uint8_t *group_public_key)
|
|||
uint32_t i;
|
||||
|
||||
for (i = 0; i < m->numchats; ++i) {
|
||||
if (id_equal(m->chats[i]->self_public_key, group_public_key))
|
||||
if (m->chats[i] != NULL)
|
||||
if (id_equal(m->chats[i]->self_public_key, group_public_key))
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user