Skip to content

Commit

Permalink
Fix NullPointerException in SurfaceTextureRegistryEntry (#7837)
Browse files Browse the repository at this point in the history
  • Loading branch information
najeira authored and jason-simmons committed Feb 15, 2019
1 parent 9a965bc commit 69e4606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shell/platform/android/io/flutter/view/FlutterView.java
Expand Up @@ -1102,7 +1102,7 @@ final class SurfaceTextureRegistryEntry implements TextureRegistry.SurfaceTextur
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.
Expand Down

0 comments on commit 69e4606

Please sign in to comment.