!94 修复崩溃栈

Merge pull request !94 from demon/OpenHarmony-3.1-Release
This commit is contained in:
openharmony_ci 2022-03-13 04:41:24 +00:00 committed by Gitee
commit c1b0b70e5f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1221,7 +1221,9 @@ namespace MiscServices {
sptr<InputClientProxy> client = new InputClientProxy(clientObject);
sptr<IInputClient> interface = client;
int remainClientNum = 0;
imsCore[0]->SetClientState(false);
if (imsCore[0] != nullptr) {
imsCore[0]->SetClientState(false);
}
HideKeyboard(client);
int ret = RemoveClient(client, remainClientNum);
if (ret != ErrorCode::NO_ERROR) {
@ -1241,7 +1243,9 @@ namespace MiscServices {
MessageParcel *data = msg->msgContent_;
sptr<IRemoteObject> clientObject = data->ReadRemoteObject();
sptr<InputClientProxy> client = new InputClientProxy(clientObject);
imsCore[0]->SetClientState(true);
if (imsCore[0] != nullptr) {
imsCore[0]->SetClientState(true);
}
ShowKeyboard(client);
}