From 17304cfab553d35d3b80f3516a63b1f4a34db8f5 Mon Sep 17 00:00:00 2001 From: Eric Heine <erheine@nps.edu> Date: Wed, 24 Feb 2021 10:12:44 -0800 Subject: [PATCH] Added a null safety check for the ScriptableVariableLabels. --- Sane Eric's UI/Scriptable Variables/ScriptableVariableLabel.cs | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sane Eric's UI/Scriptable Variables/ScriptableVariableLabel.cs b/Sane Eric's UI/Scriptable Variables/ScriptableVariableLabel.cs index 0c172cc..3b91696 100644 --- a/Sane Eric's UI/Scriptable Variables/ScriptableVariableLabel.cs +++ b/Sane Eric's UI/Scriptable Variables/ScriptableVariableLabel.cs @@ -48,7 +48,7 @@ namespace Shared.SEUI { private string GetValueString() { var value = GetValue(); if (String.IsNullOrEmpty(format)) { - return value.ToString(); + return value != null ? value.ToString() : ""; } return String.Format(format, value); } diff --git a/package.json b/package.json index 5d327c2..f7e79b6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.futuretech.shared", "displayName": "FutureTech Shared", "description": "Contains shared items such as the Scriptable Variables.", - "version": "0.1.26", + "version": "0.1.27", "unity": "2019.3", "license": "MIT", "repository": { -- GitLab