Fixed segfault.

This commit is contained in:
irungentoo 2013-11-17 16:23:28 -05:00
parent a82ad576a2
commit 067cc9630a

View File

@ -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;
}