Skip to content

Commit 15511c2

Browse files
committed
Check if resolved game object pointer matches object pointer.
1 parent 84b763e commit 15511c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NWN.Anvil/src/main/API/Objects/NwObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public async Task WaitForObjectContext()
385385
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
386386
protected void AssertObjectValid()
387387
{
388-
if (LowLevel.ServerExoApp.GetGameObject(ObjectId) == null)
388+
if (LowLevel.ServerExoApp.GetGameObject(ObjectId)?.Pointer != Object.Pointer)
389389
{
390390
throw new InvalidOperationException("Object is not valid.");
391391
}

0 commit comments

Comments
 (0)