From 9954d571de3f5af7ae309e24bd2a3b4a8f679140 Mon Sep 17 00:00:00 2001 From: Fortune117 Date: Mon, 22 Feb 2021 06:16:01 +1100 Subject: [PATCH] Fix for Crash Caused by the Entity Spawn Menu (#1588) --- Robust.Client/UserInterface/CustomControls/EntitySpawnWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Robust.Client/UserInterface/CustomControls/EntitySpawnWindow.cs b/Robust.Client/UserInterface/CustomControls/EntitySpawnWindow.cs index a9cce8f451..2cb6e2c75f 100644 --- a/Robust.Client/UserInterface/CustomControls/EntitySpawnWindow.cs +++ b/Robust.Client/UserInterface/CustomControls/EntitySpawnWindow.cs @@ -239,7 +239,7 @@ namespace Robust.Client.UserInterface.CustomControls // Calculate index of first prototype to render based on current scroll. var height = MeasureButton.DesiredSize.Y + PrototypeListContainer.Separation; - var offset = -PrototypeList.Position.Y; + var offset = Math.Max(-PrototypeList.Position.Y, 0); var startIndex = (int) Math.Floor(offset / height); PrototypeList.ItemOffset = startIndex;