From 82691cc60fd85beca3befcef6143be7a843035f5 Mon Sep 17 00:00:00 2001 From: spimort Date: Wed, 6 Nov 2024 00:07:01 -0500 Subject: [PATCH] Fix the null objects (#165) --- addons/terrabrush/TerraBrush.cs | 2 +- addons/terrabrush/plugin.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/terrabrush/TerraBrush.cs b/addons/terrabrush/TerraBrush.cs index 7f747cb..bfeaca1 100644 --- a/addons/terrabrush/TerraBrush.cs +++ b/addons/terrabrush/TerraBrush.cs @@ -564,7 +564,7 @@ private async Task CreateSnow() { } public void UpdateObjectsHeight(List zones) { - for (var i = 0; i < Objects.Length; i++) { + for (var i = 0; i < Objects?.Length; i++) { var objectsNode = _objectsContainerNode.GetNode($"{i}"); objectsNode.UpdateObjectsHeight(zones); } diff --git a/addons/terrabrush/plugin.cfg b/addons/terrabrush/plugin.cfg index c4551dd..ebac2a8 100644 --- a/addons/terrabrush/plugin.cfg +++ b/addons/terrabrush/plugin.cfg @@ -3,5 +3,5 @@ name="TerraBrush" description="" author="spimort" -version="0.9.0-alpha" +version="0.9.1-alpha" script="Plugin.cs"