]> granicus.if.org Git - icinga2/commitdiff
Fix null pointer dereference in ApiClient::TimeoutTimerHandler
authorGunnar Beutner <gunnar@beutner.name>
Fri, 27 Feb 2015 13:09:46 +0000 (14:09 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 27 Feb 2015 13:12:50 +0000 (14:12 +0100)
fixes #8553

lib/remote/apiclient.cpp

index c0c6590d6fdccf96ceb6a980d36fc1473dcccaee..cf33aec4a0f06bf875e6615d71f48e21012d9da2 100644 (file)
@@ -257,7 +257,7 @@ Value RequestCertificateHandler(const MessageOrigin& origin, const Dictionary::P
 
 void ApiClient::TimeoutTimerHandler(void)
 {
-       if (m_Seen < Utility::GetTime() - 60 && !m_Endpoint->GetSyncing()) {
+       if (m_Seen < Utility::GetTime() - 60 && (!m_Endpoint || !m_Endpoint->GetSyncing())) {
                /* Obtain a strong reference to ourselves because Disconnect otherwise removes the last reference */
                ApiClient::Ptr self = this;