From 61001ef0470076b72583d36f8e7a075d68ea08b0 Mon Sep 17 00:00:00 2001 From: cpubug Date: Tue, 8 Apr 2014 11:24:34 +0400 Subject: [PATCH] added pointer check in RoutingDestination destructor --- Identity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Identity.h b/Identity.h index c5e90a16..a4fb8f95 100644 --- a/Identity.h +++ b/Identity.h @@ -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;