Skip to content

Commit 1612fab

Browse files
committed
Protect against focus changes after .destroy()
Bug: 7026042 Change-Id: I656b612a4b5304225863d3100a98bf2b97d9890d
1 parent af18865 commit 1612fab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6981,6 +6981,8 @@ private void overrideLoading(String url) {
69816981

69826982
@Override
69836983
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
6984+
// Check if we are destroyed
6985+
if (mWebViewCore == null) return false;
69846986
// FIXME: If a subwindow is showing find, and the user touches the
69856987
// background window, it can steal focus.
69866988
if (mFindIsUp) return false;

0 commit comments

Comments
 (0)