File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 8787import android .view .ViewConfiguration ;
8888import android .view .ViewGroup ;
8989import android .view .ViewParent ;
90+ import android .view .ViewRootImpl ;
9091import android .view .ViewTreeObserver ;
9192import android .view .WindowManager ;
9293import android .view .accessibility .AccessibilityEvent ;
@@ -5435,8 +5436,9 @@ public void onDetachedFromWindow() {
54355436
54365437 if (mWebView .isHardwareAccelerated ()) {
54375438 int drawGLFunction = nativeGetDrawGLFunction (mNativeClass );
5438- if (drawGLFunction != 0 ) {
5439- mWebView .getViewRootImpl ().detachFunctor (drawGLFunction );
5439+ ViewRootImpl viewRoot = mWebView .getViewRootImpl ();
5440+ if (drawGLFunction != 0 && viewRoot != null ) {
5441+ viewRoot .detachFunctor (drawGLFunction );
54405442 }
54415443 }
54425444 }
You can’t perform that action at this time.
0 commit comments