Fix NPE in TextureView

am: 3c2587f26e

Change-Id: I79f35e5029cb3abb5fa74a60e448cd09835e2112
This commit is contained in:
John Reck
2016-08-04 16:43:29 +00:00
committed by android-build-merger

View File

@@ -242,6 +242,7 @@ public class TextureView extends View {
} }
private void releaseSurfaceTexture() { private void releaseSurfaceTexture() {
if (mSurface != null) {
boolean shouldRelease = true; boolean shouldRelease = true;
if (mListener != null) { if (mListener != null) {
@@ -258,6 +259,7 @@ public class TextureView extends View {
mSurface = null; mSurface = null;
mHadSurface = true; mHadSurface = true;
} }
}
/** /**
* The layer type of a TextureView is ignored since a TextureView is always * The layer type of a TextureView is ignored since a TextureView is always