From 29978a0f2a127223260db1b37420bed9b5e97e9a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 4 Mar 2024 09:49:03 +0100 Subject: [PATCH] null check SurfaceTextureHelper --- .../eu/siacs/conversations/xmpp/jingle/VideoSourceWrapper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/VideoSourceWrapper.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/VideoSourceWrapper.java index c1ff24521..89552fc18 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/VideoSourceWrapper.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/VideoSourceWrapper.java @@ -57,6 +57,9 @@ class VideoSourceWrapper { final EglBase.Context eglBaseContext) { final SurfaceTextureHelper surfaceTextureHelper = SurfaceTextureHelper.create("webrtc", eglBaseContext); + if (surfaceTextureHelper == null) { + throw new IllegalStateException("Could not create SurfaceTextureHelper"); + } this.videoSource = peerConnectionFactory.createVideoSource(false); this.cameraVideoCapturer.initialize( surfaceTextureHelper, context, this.videoSource.getCapturerObserver());