From d52d316cd2acb147037d882a8985ef425cbab62e Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 13 Nov 2016 14:56:34 +0100 Subject: [PATCH] [BitMessage] Small sanity check --- src/Components/Modules/BitMessage.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Components/Modules/BitMessage.cpp b/src/Components/Modules/BitMessage.cpp index 37be40dd..aca8f745 100644 --- a/src/Components/Modules/BitMessage.cpp +++ b/src/Components/Modules/BitMessage.cpp @@ -203,17 +203,17 @@ namespace Components void BitMessage::ShutDown() { - BitMessage::Save(); - delete BitMessage::BMClient; - BitMessage::BMClient = nullptr; + if (BitMessage::BMClient) + { + BitMessage::Save(); + delete BitMessage::BMClient; + BitMessage::BMClient = nullptr; + } } BitMessage::~BitMessage() { - if (BitMessage::BMClient) - { - BitMessage::ShutDown(); - } + BitMessage::ShutDown(); } void BitMessage::SetDefaultTTL(time_t ttl)