From 278406393cec8f92553d719b64846e1b280cc4ae Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 7 Feb 2015 16:53:50 -0500 Subject: [PATCH] Only create one global logger instance. --- toxcore/tox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxcore/tox.c b/toxcore/tox.c index 4879a830..82beb561 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -1012,8 +1012,8 @@ uint32_t tox_do_interval(Tox *tox) */ Tox *tox_new(Tox_Options *options) { - logger_set_global(logger_new(LOGGER_OUTPUT_FILE, LOGGER_LEVEL, "toxcore")); - + if (!logger_get_global()) + logger_set_global(logger_new(LOGGER_OUTPUT_FILE, LOGGER_LEVEL, "toxcore")); Messenger_Options m_options = {0};