From ad804855f9b70a6bab88e9ba6362f0f613f6d019 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 29 Sep 2014 13:45:51 -0400 Subject: [PATCH] Fixed crash in tox_new(). --- toxcore/Messenger.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index d5ab6ee1..a78b06b6 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -1607,6 +1607,9 @@ Messenger *new_messenger(Messenger_Options *options) /* Run this before closing shop. */ void kill_messenger(Messenger *m) { + if (!m) + return; + uint32_t i; kill_friend_connections(m->fr_c);