diff --git a/ecal/core/src/service/ecal_service_client_impl.cpp b/ecal/core/src/service/ecal_service_client_impl.cpp index cb9c949..ee7076c 100644 --- a/ecal/core/src/service/ecal_service_client_impl.cpp +++ b/ecal/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;