Skip to content

Commit fcf9f6a

Browse files
committed
fix: Fixed transport delegate invocation
1 parent f939d31 commit fcf9f6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

MLAPI/Transports/Transport.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ internal void ResetChannelCache()
4040
_channelsCache = null;
4141
}
4242

43-
public TransportChannel[] MLAPI_CHANNELS
43+
public TransportChannel[] MLAPI_CHANNELS
4444
{
4545
get
4646
{
4747
if (_channelsCache == null)
4848
{
4949
List<TransportChannel> channels = new List<TransportChannel>();
5050

51-
OnChannelRegistration(channels);
51+
if (OnChannelRegistration != null)
52+
{
53+
OnChannelRegistration(channels);
54+
}
5255

5356
_channelsCache = new TransportChannel[MLAPI_INTERNAL_CHANNELS.Length + channels.Count];
5457

0 commit comments

Comments
 (0)