From 9a5d31aa67f18ec818759722cd8f2bdef6f98a0d Mon Sep 17 00:00:00 2001 From: Mohelm97 Date: Sun, 4 Aug 2024 16:42:23 +0300 Subject: [PATCH] Fix bug in RtcVideoSource (#49) * Add UnpublishTrack to local participant, fix LocalTrackPublished event * Check if there is no delegate attached --- Runtime/Scripts/RtcVideoSource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Scripts/RtcVideoSource.cs b/Runtime/Scripts/RtcVideoSource.cs index 17c7673..18cf3ab 100644 --- a/Runtime/Scripts/RtcVideoSource.cs +++ b/Runtime/Scripts/RtcVideoSource.cs @@ -156,7 +156,7 @@ public IEnumerator Update() TextureReceived?.Invoke(_texture2D); } - if(TextureReceived.GetInvocationList().Length > 0) + if(TextureReceived != null && TextureReceived.GetInvocationList().Length > 0) { LoadToTexture2D(_texture2D, _dest as RenderTexture); }