diff options
-rw-r--r-- | toxcore/Messenger.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index cf3a60bf..6b81427c 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -721,9 +721,6 @@ void m_callback_connectionstatus(Messenger *m, void (*function)(Messenger *m, in | |||
721 | static void break_files(Messenger *m, int friendnumber); | 721 | static void break_files(Messenger *m, int friendnumber); |
722 | static void check_friend_connectionstatus(Messenger *m, int friendnumber, uint8_t status) | 722 | static void check_friend_connectionstatus(Messenger *m, int friendnumber, uint8_t status) |
723 | { | 723 | { |
724 | if (!m->friend_connectionstatuschange) | ||
725 | return; | ||
726 | |||
727 | if (status == NOFRIEND) | 724 | if (status == NOFRIEND) |
728 | return; | 725 | return; |
729 | 726 | ||
@@ -740,7 +737,8 @@ static void check_friend_connectionstatus(Messenger *m, int friendnumber, uint8_ | |||
740 | add_online_friend(m, friendnumber); | 737 | add_online_friend(m, friendnumber); |
741 | } | 738 | } |
742 | 739 | ||
743 | m->friend_connectionstatuschange(m, friendnumber, is_online, m->friend_connectionstatuschange_userdata); | 740 | if (m->friend_connectionstatuschange) |
741 | m->friend_connectionstatuschange(m, friendnumber, is_online, m->friend_connectionstatuschange_userdata); | ||
744 | } | 742 | } |
745 | } | 743 | } |
746 | 744 | ||