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;