diff --git a/src/contactmethod.cpp b/src/contactmethod.cpp index 0d4799020dba74825aefa469fda41622435d41b8..28f0656b1ae9da93ead5f92e726522cbb5de0a7e 100644 --- a/src/contactmethod.cpp +++ b/src/contactmethod.cpp @@ -222,7 +222,8 @@ void ContactMethod::setPerson(Person* contact) //The sha1 is no longer valid d_ptr->m_Sha1.clear(); - contact->d_ptr->registerContactMethod(this); + if (contact) + contact->d_ptr->registerContactMethod(this); if (contact && d_ptr->m_Type != ContactMethod::Type::TEMPORARY) { PhoneDirectoryModel::instance().d_ptr->indexNumber(this,d_ptr->m_hNames.keys()+QStringList(contact->formattedName()));