From: Gunnar Beutner Date: Fri, 27 Feb 2015 13:09:46 +0000 (+0100) Subject: Fix null pointer dereference in ApiClient::TimeoutTimerHandler X-Git-Tag: v2.3.0~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2884e8318dac578da6634e572819c3dfbe05c12e;p=icinga2 Fix null pointer dereference in ApiClient::TimeoutTimerHandler fixes #8553 --- diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp index c0c6590d6..cf33aec4a 100644 --- a/lib/remote/apiclient.cpp +++ b/lib/remote/apiclient.cpp @@ -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;