From a2748969b17c003d2f3afa8df68c11063fc9f699 Mon Sep 17 00:00:00 2001 From: li-tiangang4 Date: Tue, 14 May 2024 15:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9crash=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-tiangang4 --- common/include/input_hub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index ec78286..77ee319 100644 --- a/common/include/input_hub.cpp +++ b/common/include/input_hub.cpp @@ -561,10 +561,10 @@ int32_t InputHub::OpenInputDeviceLocked(const std::string &devicePath) GenerateDescriptor(device->identifier); IncreaseLogTimes(device->identifier.descriptor); RecordDeviceLog(devicePath, device->identifier); - + std::string descriptor = device->identifier.descriptor; if (MakeDevice(fd, std::move(device)) < 0) { CloseFd(fd); - if (IsNeedPrintLog(device->identifier.descriptor)) { + if (IsNeedPrintLog(descriptor)) { DHLOGI("Opening device error: %{public}s", devicePath.c_str()); } return ERR_DH_INPUT_HUB_MAKE_DEVICE_FAIL; -- Gitee