diff --git a/frameworks/inputmethod_ability/src/input_method_ability.cpp b/frameworks/inputmethod_ability/src/input_method_ability.cpp index fb96345..5003cc1 100644 --- a/frameworks/inputmethod_ability/src/input_method_ability.cpp +++ b/frameworks/inputmethod_ability/src/input_method_ability.cpp @@ -249,7 +249,7 @@ namespace MiscServices { IMSA_HILOGI("InputMethodAbility::OnShowKeyboard"); MessageParcel *data = msg->msgContent_; sptr channalProxy = new (std::nothrow) InputDataChannelProxy(data->ReadRemoteObject()); - if (inputDataChannel) { + if (channalProxy != nullptr) { inputDataChannel = channalProxy; IMSA_HILOGI("InputMethodAbility::OnShowKeyboard inputDataChannel is not nullptr"); }