Commit 0983e1bd authored by Anupam Snigdha's avatar Anupam Snigdha Committed by Commit Bot

Fixed access violation error in TSFTextStore::GetScreenExt.

In some interactive_ui_tests, upon exit the TextInputClient object becomes null.
This happens mostly in release builds where the GetScreenExt call from TSF happens
after the test has exited which results in an AV in TSFTextStore::GetScreenExt.

Bug: 1053769
Change-Id: I759eac57ddf0c08988dbb88f02dc796ede92a060
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063673Reviewed-by: default avatarYohei Yukawa <yukawa@chromium.org>
Commit-Queue: Anupam Snigdha <snianu@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#742416}
parent fc8e963e
...@@ -182,6 +182,8 @@ STDMETHODIMP TSFTextStore::GetScreenExt(TsViewCookie view_cookie, RECT* rect) { ...@@ -182,6 +182,8 @@ STDMETHODIMP TSFTextStore::GetScreenExt(TsViewCookie view_cookie, RECT* rect) {
return E_INVALIDARG; return E_INVALIDARG;
if (!rect) if (!rect)
return E_INVALIDARG; return E_INVALIDARG;
if (!text_input_client_)
return E_UNEXPECTED;
// {0, 0, 0, 0} means that the document rect is not currently displayed. // {0, 0, 0, 0} means that the document rect is not currently displayed.
SetRect(rect, 0, 0, 0, 0); SetRect(rect, 0, 0, 0, 0);
......
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