diff options
Diffstat (limited to 'core/Messenger.c')
-rw-r--r-- | core/Messenger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Messenger.c b/core/Messenger.c index 2c9e134b..2b5c8241 100644 --- a/core/Messenger.c +++ b/core/Messenger.c | |||
@@ -39,7 +39,7 @@ int realloc_friendlist(Messenger *m, uint32_t num) | |||
39 | { | 39 | { |
40 | Friend *newfriendlist = realloc(m->friendlist, num * sizeof(Friend)); | 40 | Friend *newfriendlist = realloc(m->friendlist, num * sizeof(Friend)); |
41 | 41 | ||
42 | if (newfriendlist == NULL) | 42 | if (newfriendlist == NULL && num != 0) |
43 | return -1; | 43 | return -1; |
44 | 44 | ||
45 | m->friendlist = newfriendlist; | 45 | m->friendlist = newfriendlist; |