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