From dbdb9b4ab943998816d65e3553bf608ad00b7dd6 Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Fri, 14 Jan 2022 17:52:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- interfaces/kits/js/napi/js_input_method_engine.cpp | 1 - services/src/peruser_setting.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/interfaces/kits/js/napi/js_input_method_engine.cpp b/interfaces/kits/js/napi/js_input_method_engine.cpp index aad47e6..a1e8121 100644 --- a/interfaces/kits/js/napi/js_input_method_engine.cpp +++ b/interfaces/kits/js/napi/js_input_method_engine.cpp @@ -276,7 +276,6 @@ namespace MiscServices { eventTarget->Off(type); } - delete type; type = nullptr; napi_value result = nullptr; napi_get_undefined(env, &result); diff --git a/services/src/peruser_setting.cpp b/services/src/peruser_setting.cpp index 0d999c8..bb897dd 100644 --- a/services/src/peruser_setting.cpp +++ b/services/src/peruser_setting.cpp @@ -161,7 +161,7 @@ namespace MiscServices { std::u16string key = InputMethodSetting::ENABLED_INPUT_METHODS_TAG; imSetting.SetValue(key, inputMethodSetting.GetValue(key)); - int flag = imSetting.RemoveEnabledInputMethod(imeId); + bool flag = imSetting.RemoveEnabledInputMethod(imeId); if (flag == false) { IMSA_HILOGI("The package removed is not an enabled IME. [%d]\n", userId_); return ErrorCode::NO_ERROR;