From d9f4c7635612f0868aea70902b085bbad9abe163 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Thu, 16 Aug 2018 16:26:42 -0700 Subject: [PATCH] Add a nullptr check --- src/cpp/server/server_cc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 46872c85a18..67f3f177ae4 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -588,7 +588,7 @@ void Server::Start(ServerCompletionQueue** cqs, size_t num_cqs) { // If this server has any support for synchronous methods (has any sync // server CQs), make sure that we have a ResourceExhausted handler // to deal with the case of thread exhaustion - if (!sync_server_cqs_->empty()) { + if (sync_server_cqs != nullptr && !sync_server_cqs_->empty()) { resource_exhausted_handler_.reset(new internal::ResourceExhaustedHandler); }