Skip to content
Snippets Groups Projects
Commit 994f439c authored by Emmanuel Lepage Vallée's avatar Emmanuel Lepage Vallée Committed by Nicolas Jager
Browse files

contactmethod: Potential null dereference.


Should not happen, but is technically possible.

Change-Id: Icfc4015267fd5d023e45f558f07e974a380b2859
Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
parent cad952f1
No related branches found
No related tags found
No related merge requests found
...@@ -222,6 +222,7 @@ void ContactMethod::setPerson(Person* contact) ...@@ -222,6 +222,7 @@ void ContactMethod::setPerson(Person* contact)
//The sha1 is no longer valid //The sha1 is no longer valid
d_ptr->m_Sha1.clear(); d_ptr->m_Sha1.clear();
if (contact)
contact->d_ptr->registerContactMethod(this); contact->d_ptr->registerContactMethod(this);
if (contact && d_ptr->m_Type != ContactMethod::Type::TEMPORARY) { if (contact && d_ptr->m_Type != ContactMethod::Type::TEMPORARY) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment