diff --git a/src/recentmodel.cpp b/src/recentmodel.cpp
index 014ed9466870a766689bfd8613683068d1fd052d..d3d86ec41b48958b2d3f08dcbdbec1fc048a5e9a 100644
--- a/src/recentmodel.cpp
+++ b/src/recentmodel.cpp
@@ -778,7 +778,8 @@ void RecentModelPrivate::slotContactChanged(ContactMethod* contactMethod, const
 
     if (not newPerson
         or /* avoid to add en entry in recent model when a person was built for a contact request */
-        contactMethod->account()->pendingContactRequestModel()->findContactRequestFrom(contactMethod))
+        (contactMethod->account()
+         and contactMethod->account()->pendingContactRequestModel()->findContactRequestFrom(contactMethod)))
         return;
 
     // make sure the Person node exists first, then move any children of the CM nodes