Commit 15403606 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed crash in AndroidPlatformHelper

parent e4a9af55
......@@ -514,10 +514,12 @@ public class AndroidPlatformHelper {
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
Log.i("[Platform Helper] Rendering surface texture destroyed");
if (mNativePtr != 0 && surface.equals(mVideoTextureView.getSurfaceTexture())) {
Log.i("[Platform Helper] Current rendering surface texture is no longer available");
mVideoTextureView = null;
setNativeVideoWindowId(mNativePtr, null);
if (mNativePtr != 0 && mVideoTextureView != null) {
if (surface.equals(mVideoTextureView.getSurfaceTexture()) {
Log.i("[Platform Helper] Current rendering surface texture is no longer available");
mVideoTextureView = null;
setNativeVideoWindowId(mNativePtr, null);
}
}
if (!DeviceUtils.isSurfaceTextureReleased(surface)) {
......
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