Commit 9651be2c authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE on SurfaceTextureThread

parent 3018e3d1
......@@ -362,7 +362,8 @@ public class AWindow implements IVLCVout {
cb.onSurfacesDestroyed(this);
if (mSurfaceCallback != null)
mSurfaceCallback.onSurfacesDestroyed(this);
mSurfaceTextureThread.release();
if (AndroidUtil.isJellyBeanOrLater)
mSurfaceTextureThread.release();
}
@Override
......@@ -760,10 +761,7 @@ public class AWindow implements IVLCVout {
*/
@SuppressWarnings("unused") /* used by JNI */
boolean SurfaceTexture_attachToGLContext(int texName) {
if (AndroidUtil.isJellyBeanOrLater) {
return mSurfaceTextureThread.attachToGLContext(texName);
} else
return false;
return AndroidUtil.isJellyBeanOrLater && mSurfaceTextureThread.attachToGLContext(texName);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment