Protect against focus changes after .destroy()
Bug: 7026042
Change-Id: I656b612a4b5304225863d3100a98bf2b97d9890d
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 9df4852..86e7f9b 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -6981,6 +6981,8 @@
@Override
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
+ // Check if we are destroyed
+ if (mWebViewCore == null) return false;
// FIXME: If a subwindow is showing find, and the user touches the
// background window, it can steal focus.
if (mFindIsUp) return false;