From 9a3804d3ea4a6405a257d307de1c9ef058e1605f Mon Sep 17 00:00:00 2001 From: wangyikai Date: Wed, 13 Nov 2024 17:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90hdf=5Fcore=E3=80=91=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=A6=81=E6=B1=82=E5=85=A5=E5=8F=82=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyikai --- adapter/uhdf2/hdi/src/iservmgr_client.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adapter/uhdf2/hdi/src/iservmgr_client.cpp b/adapter/uhdf2/hdi/src/iservmgr_client.cpp index 90c53f07d..e8b3fdb95 100644 --- a/adapter/uhdf2/hdi/src/iservmgr_client.cpp +++ b/adapter/uhdf2/hdi/src/iservmgr_client.cpp @@ -123,6 +123,11 @@ int32_t ServiceManagerProxy::UnregisterServiceStatusListener(::OHOS::sptr ServiceManagerProxy::GetService(const char *serviceName) { + if (nullptr == serviceName) { + HDF_LOGE("serviceName is nullptr"); + return nullptr; + } + MessageParcel data; MessageParcel reply; if (!data.WriteInterfaceToken(GetDescriptor()) || !data.WriteCString(serviceName)) { -- Gitee