Commit 9ab606b5 authored by Siye Liu's avatar Siye Liu Committed by Commit Bot

Should check TSFBridge availability before accessing it.

We should check whether |TSFBridge| is initialized before accessing it
in |InputMethodWinTSF::OnWillChangeFocusedClient|.

Bug: 1126159
Change-Id: If84b28007549c38e33ae947ac7d9dbec627a1ee2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399454Reviewed-by: default avatarYohei Yukawa <yukawa@chromium.org>
Commit-Queue: Siye Liu <siliu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#807094}
parent 0e7f03fd
......@@ -142,7 +142,7 @@ bool InputMethodWinTSF::IsCandidatePopupOpen() const {
void InputMethodWinTSF::OnWillChangeFocusedClient(
TextInputClient* focused_before,
TextInputClient* focused) {
if (IsWindowFocused(focused_before)) {
if (ui::TSFBridge::GetInstance() && IsWindowFocused(focused_before)) {
ConfirmCompositionText();
ui::TSFBridge::GetInstance()->RemoveFocusedClient(focused_before);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment