From 1645a79abcb54baf41ba4117433e51ce1902c2ce Mon Sep 17 00:00:00 2001 From: Anton Franzluebbers Date: Thu, 30 Nov 2023 15:29:21 -0500 Subject: [PATCH] fix null ref on dictionary query --- unity_package/Runtime/VELConnectManager.cs | 3 ++- unity_package/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/unity_package/Runtime/VELConnectManager.cs b/unity_package/Runtime/VELConnectManager.cs index b1b137e..dc0216c 100644 --- a/unity_package/Runtime/VELConnectManager.cs +++ b/unity_package/Runtime/VELConnectManager.cs @@ -710,7 +710,8 @@ namespace VELConnect { foreach (string key in data.Keys.ToArray()) { - if (instance.state.room.data[key] == data[key]) + instance.state.room.data.TryGetValue(key, out string currentValue); + if (currentValue == data[key]) { data.Remove(key); } diff --git a/unity_package/package.json b/unity_package/package.json index 9143254..491beda 100644 --- a/unity_package/package.json +++ b/unity_package/package.json @@ -1,7 +1,7 @@ { "name": "edu.uga.engr.vel.vel-connect", "displayName": "VEL-Connect", - "version": "2.1.1", + "version": "2.1.2", "unity": "2019.1", "description": "Web-based configuration for VR applications", "keywords": [],