diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp
index b6ac6eb7dc21967ac9da0833a1732548f4028a6f..cb4123cc61c22c3b1bc0266223ed9691893f48bf 100644
--- a/daemon/src/sip/sipaccount.cpp
+++ b/daemon/src/sip/sipaccount.cpp
@@ -834,10 +834,12 @@ std::string SIPAccount::getContactHeader() const
 
 void SIPAccount::keepAliveRegistrationCb(UNUSED pj_timer_heap_t *th, pj_timer_entry *te)
 {
-    SIPAccount *sipAccount = reinterpret_cast<SIPAccount *>(te->user_data);
+    SIPAccount *sipAccount = static_cast<SIPAccount *>(te->user_data);
 
-    if (sipAccount == NULL)
+    if (sipAccount == NULL) {
         ERROR("Sip account is NULL while registering a new keep alive timer");
+        return;
+    }
 
     // IP2IP default does not require keep-alive
     if (sipAccount->getAccountID() == IP2IP_PROFILE)