Skip to content

Commit

Permalink
Fixed an issue with unhandled errors when users left room
Browse files Browse the repository at this point in the history
  • Loading branch information
David Liebemann committed Nov 25, 2021
1 parent 282dfd4 commit 9ebacfa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void Update()
if (null == sourceData || !sourceData.ConnectedSource)
{
dataToRemove.Add(audioSource);
Debug.LogError("Source Data or Connected Source in DirectionalAudioListener is invalid, removing AudioSource from List.");
continue;
}

Vector3 sourcePosition = sourceData.ConnectedSource.transform.position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void OnMediaAdded(object arg0, MediaAddedEventArgs mediaAddedEventArgs)
{
Room pushToTalkRoom = OdinHandler.Instance.Rooms[pushToTalkData.connectedRoom];
// if the local microphone is the one, for which OnMediaAdded was called
if (pushToTalkRoom.MicrophoneMedia.Id == mediaAddedEventArgs.Media.Id)
if (null != pushToTalkRoom.MicrophoneMedia && pushToTalkRoom.MicrophoneMedia.Id == mediaAddedEventArgs.Media.Id)
{
// mute the microphone initially
pushToTalkRoom.MicrophoneMedia.SetMute(true);
Expand Down
2 changes: 1 addition & 1 deletion ODIN-SampleProject/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.5.0
bundleVersion: 0.5.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down

0 comments on commit 9ebacfa

Please sign in to comment.