Skip to content

Commit 1489910

Browse files
committed
Fix null comparison in AsyncUpdatableVariable
1 parent 0551a05 commit 1489910

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SDK.CSharp/Updatables/AsyncUpdatableVariable.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using OpenShock.MinimalEvents;
1+
using System.Collections.Generic;
2+
using OpenShock.MinimalEvents;
23

34
namespace OpenShock.SDK.CSharp.Updatables;
45

@@ -9,7 +10,7 @@ public T Value
910
get => _internalValue;
1011
set
1112
{
12-
if (_internalValue!.Equals(value)) return;
13+
if (EqualityComparer<T>.Default.Equals(_internalValue, value)) return;
1314
_internalValue = value;
1415
Task.Run(() => _updated.InvokeAsyncParallel(value));
1516
}

0 commit comments

Comments
 (0)