added pointer check in RoutingDestination destructor

This commit is contained in:
cpubug 2014-04-08 11:24:34 +04:00
parent b3ee41bd91
commit 61001ef047

View File

@ -106,7 +106,7 @@ namespace data
public:
RoutingDestination (): m_ElGamalEncryption (nullptr) {};
virtual ~RoutingDestination () { delete m_ElGamalEncryption; };
virtual ~RoutingDestination () { if (m_ElGamalEncryption) delete m_ElGamalEncryption; };
virtual const IdentHash& GetIdentHash () const = 0;
virtual const uint8_t * GetEncryptionPublicKey () const = 0;