From 41c23743c1c0cfeb0a2bf9ad1cbfb1a50a10a0ef Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 18 Feb 2024 06:24:50 -0700 Subject: [PATCH] Game no longer crashes in edit mode when creating a new polygon fixes #1361 --- .../GlueControl/Embedded/Editing/SelectionLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FRBDK/Glue/GameCommunicationPlugin/GlueControl/Embedded/Editing/SelectionLogic.cs b/FRBDK/Glue/GameCommunicationPlugin/GlueControl/Embedded/Editing/SelectionLogic.cs index 18f1d27ba..535d77160 100644 --- a/FRBDK/Glue/GameCommunicationPlugin/GlueControl/Embedded/Editing/SelectionLogic.cs +++ b/FRBDK/Glue/GameCommunicationPlugin/GlueControl/Embedded/Editing/SelectionLogic.cs @@ -587,7 +587,7 @@ void MakePolygonRectangleMinMax(float minXInner, float maxXInner, float minYInne { polygon = polygon ?? new PolygonFast(); - polygon.Points = asPolygon.Points.ToList(); + polygon.Points = asPolygon.Points?.ToList() ?? new List(); polygon.Position = asPolygon.Position; polygon.RotationMatrix = asPolygon.RotationMatrix; }