From 4312d53b1989ec3517f00d5a1ccee8f6888f2537 Mon Sep 17 00:00:00 2001 From: rex-schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:12:05 +0100 Subject: [PATCH] service implementation nullptr issue --- src/core/src/service/ecal_service_client_impl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/src/service/ecal_service_client_impl.cpp b/src/core/src/service/ecal_service_client_impl.cpp index cb9c949..ee7076c 100644 --- a/src/core/src/service/ecal_service_client_impl.cpp +++ b/src/core/src/service/ecal_service_client_impl.cpp @@ -184,11 +184,10 @@ namespace eCAL // blocking call, all responses will be returned in service_response_vec_ bool CServiceClientImpl::Call(const std::string& method_name_, const std::string& request_, int timeout_ms_, ServiceResponseVecT* service_response_vec_) { - auto responses = CallBlocking(method_name_, request_, std::chrono::milliseconds(timeout_ms_)); + if(service_response_vec_ == nullptr) return false; + service_response_vec_->clear(); - if (service_response_vec_) - service_response_vec_->clear(); - + auto responses = CallBlocking(method_name_, request_, std::chrono::milliseconds(timeout_ms_)); if (!responses) { return false;