diff options
author | irungentoo <irungentoo@gmail.com> | 2013-11-17 16:23:28 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-11-17 16:23:28 -0500 |
commit | 067cc9630afe9265ce38d59f6c756b8983ae73b3 (patch) | |
tree | 7ed1e45c23d15e7d33ccdffe69f5e82ff9f41c2f /toxcore/Messenger.c | |
parent | a82ad576a286e2908c366d5de07f2d82e364d2c8 (diff) |
Fixed segfault.
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 57cafc3f..c2971a70 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -732,7 +732,8 @@ static int group_num(Messenger *m, uint8_t *group_public_key) | |||
732 | uint32_t i; | 732 | uint32_t i; |
733 | 733 | ||
734 | for (i = 0; i < m->numchats; ++i) { | 734 | for (i = 0; i < m->numchats; ++i) { |
735 | if (id_equal(m->chats[i]->self_public_key, group_public_key)) | 735 | if (m->chats[i] != NULL) |
736 | if (id_equal(m->chats[i]->self_public_key, group_public_key)) | ||
736 | return i; | 737 | return i; |
737 | } | 738 | } |
738 | 739 | ||