提交 69e46060 编写于 作者: N najeira 提交者: Jason Simmons

Fix NullPointerException in SurfaceTextureRegistryEntry (#7837)

上级 9a965bc3
......@@ -1102,7 +1102,7 @@ public class FlutterView extends SurfaceView
private SurfaceTexture.OnFrameAvailableListener onFrameListener = new SurfaceTexture.OnFrameAvailableListener() {
@Override
public void onFrameAvailable(SurfaceTexture texture) {
if (released) {
if (released || mNativeView == null) {
// Even though we make sure to unregister the callback before releasing, as of Android O
// SurfaceTexture has a data race when accessing the callback, so the callback may
// still be called by a stale reference after released==true and mNativeView==null.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册