Skip to content

Commit 64e40e3

Browse files
committed
fix comparison against the default object
1 parent 805766e commit 64e40e3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Packages/StreamVideo/Runtime/Core/DeviceManagers/MicrophoneDeviceInfo.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@ internal MicrophoneDeviceInfo(int id, string name)
3535

3636
public bool Equals(MicrophoneDeviceInfo other)
3737
{
38+
var sameKind = UseUnityAudioSystem == other.UseUnityAudioSystem;
39+
if (!sameKind)
40+
{
41+
return false;
42+
}
43+
3844
if (UseUnityAudioSystem)
3945
{
40-
return string.Equals(StringId, other.StringId);
46+
return string.Equals(StringId, other.StringId, StringComparison.Ordinal);
4147
}
4248

4349
return IntId == other.IntId;

0 commit comments

Comments
 (0)