Skip to content

Commit 9a5d31a

Browse files
authored
Fix bug in RtcVideoSource (#49)
* Add UnpublishTrack to local participant, fix LocalTrackPublished event * Check if there is no delegate attached
1 parent 3d94ef8 commit 9a5d31a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/Scripts/RtcVideoSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public IEnumerator Update()
156156
TextureReceived?.Invoke(_texture2D);
157157
}
158158

159-
if(TextureReceived.GetInvocationList().Length > 0)
159+
if(TextureReceived != null && TextureReceived.GetInvocationList().Length > 0)
160160
{
161161
LoadToTexture2D(_texture2D, _dest as RenderTexture);
162162
}

0 commit comments

Comments
 (0)