[BitMessage] Small sanity check

This commit is contained in:
momo5502 2016-11-13 14:56:34 +01:00
parent 0739e4aa48
commit d52d316cd2

View File

@ -203,17 +203,17 @@ namespace Components
void BitMessage::ShutDown() void BitMessage::ShutDown()
{ {
BitMessage::Save(); if (BitMessage::BMClient)
delete BitMessage::BMClient; {
BitMessage::BMClient = nullptr; BitMessage::Save();
delete BitMessage::BMClient;
BitMessage::BMClient = nullptr;
}
} }
BitMessage::~BitMessage() BitMessage::~BitMessage()
{ {
if (BitMessage::BMClient) BitMessage::ShutDown();
{
BitMessage::ShutDown();
}
} }
void BitMessage::SetDefaultTTL(time_t ttl) void BitMessage::SetDefaultTTL(time_t ttl)