From 2884e8318dac578da6634e572819c3dfbe05c12e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 27 Feb 2015 14:09:46 +0100 Subject: [PATCH] Fix null pointer dereference in ApiClient::TimeoutTimerHandler fixes #8553 --- lib/remote/apiclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.40.0